diff --git a/sbin/ccdconfig/Makefile b/sbin/ccdconfig/Makefile index ab042b3283ed..13f6e1f9d639 100644 --- a/sbin/ccdconfig/Makefile +++ b/sbin/ccdconfig/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 1995/08/17 16:37:17 thorpej Exp $ +# $NetBSD: Makefile,v 1.2 1996/05/16 07:11:17 thorpej Exp $ PROG= ccdconfig MAN= ccdconfig.8 @@ -6,7 +6,7 @@ MAN= ccdconfig.8 BINGRP= kmem BINMODE=2555 -DPADD= ${LIBKVM} -LDADD= -lkvm +DPADD= ${LIBKVM} ${LIBUTIL} +LDADD= -lkvm -lutil .include diff --git a/sbin/ccdconfig/ccdconfig.c b/sbin/ccdconfig/ccdconfig.c index 7aedadf3cf55..9d8f8a56b024 100644 --- a/sbin/ccdconfig/ccdconfig.c +++ b/sbin/ccdconfig/ccdconfig.c @@ -1,4 +1,4 @@ -/* $NetBSD: ccdconfig.c,v 1.5 1996/02/28 01:01:18 thorpej Exp $ */ +/* $NetBSD: ccdconfig.c,v 1.6 1996/05/16 07:11:18 thorpej Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -54,6 +54,7 @@ #include #include #include +#include #include @@ -97,8 +98,6 @@ static int do_io __P((char *, u_long, struct ccd_ioctl *)); static int do_single __P((int, char **, int)); static int do_all __P((int)); static int dump_ccd __P((int, char **)); -static int getmaxpartitions __P((void)); -static int getrawpartition __P((void)); static int flags_to_val __P((char *)); static int pathtodevt __P((char *, dev_t *)); static void print_ccd_info __P((struct ccd_softc *, kvm_t *)); @@ -624,36 +623,6 @@ print_ccd_info(cs, kd) free(cip); } -static int -getmaxpartitions() -{ - int maxpart, mib[2]; - size_t varlen; - - mib[0] = CTL_KERN; - mib[1] = KERN_MAXPARTITIONS; - varlen = sizeof(maxpart); - if (sysctl(mib, 2, &maxpart, &varlen, NULL, 0) < 0) - return (-1); - - return (maxpart); -} - -static int -getrawpartition() -{ - int rawpart, mib[2]; - size_t varlen; - - mib[0] = CTL_KERN; - mib[1] = KERN_RAWPARTITION; - varlen = sizeof(rawpart); - if (sysctl(mib, 2, &rawpart, &varlen, NULL, 0) < 0) - return (-1); - - return (rawpart); -} - static int flags_to_val(flags) char *flags;