diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-22 11:36:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-05-22 11:36:02 +0000 |
commit | 806021be093ad00ce2022a532c0f4cc99b0065ac (patch) | |
tree | c4f374fc66dbd93cdd093f4e1213808e855c8b39 /sbin/newlfs | |
parent | 200dde568cd8db5fa9ddc42e6b5388df55a16573 (diff) |
libutil
Diffstat (limited to 'sbin/newlfs')
-rw-r--r-- | sbin/newlfs/Makefile | 5 | ||||
-rw-r--r-- | sbin/newlfs/newfs.c | 21 |
2 files changed, 7 insertions, 19 deletions
diff --git a/sbin/newlfs/Makefile b/sbin/newlfs/Makefile index ccf83c7436e..929101505c5 100644 --- a/sbin/newlfs/Makefile +++ b/sbin/newlfs/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 1995/03/18 14:58:45 cgd Exp $ +# $NetBSD: Makefile,v 1.6 1996/05/16 07:17:49 thorpej Exp $ # @(#)Makefile 8.1 (Berkeley) 6/18/93 PROG= newlfs @@ -6,4 +6,7 @@ SRCS= dkcksum.c lfs.c lfs_cksum.c misc.c newfs.c MAN= newlfs.8 .PATH: ${.CURDIR}/../../sys/ufs/lfs ${.CURDIR}/../disklabel +DPADD= ${LIBUTIL} +LDADD= -lutil + .include <bsd.prog.mk> diff --git a/sbin/newlfs/newfs.c b/sbin/newlfs/newfs.c index ef7d9be96ec..2668ff6cab0 100644 --- a/sbin/newlfs/newfs.c +++ b/sbin/newlfs/newfs.c @@ -1,4 +1,4 @@ -/* $NetBSD: newfs.c,v 1.4 1995/06/28 02:21:32 thorpej Exp $ */ +/* $NetBSD: newfs.c,v 1.5 1996/05/16 07:17:50 thorpej Exp $ */ /*- * Copyright (c) 1989, 1992, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)newfs.c 8.3 (Berkeley) 4/22/94"; #else -static char rcsid[] = "$NetBSD: newfs.c,v 1.4 1995/06/28 02:21:32 thorpej Exp $"; +static char rcsid[] = "$NetBSD: newfs.c,v 1.5 1996/05/16 07:17:50 thorpej Exp $"; #endif #endif /* not lint */ @@ -69,6 +69,7 @@ static char rcsid[] = "$NetBSD: newfs.c,v 1.4 1995/06/28 02:21:32 thorpej Exp $" #include <ctype.h> #include <string.h> #include <paths.h> +#include <util.h> #include "config.h" #include "extern.h" @@ -119,7 +120,6 @@ char *progname, *special; static struct disklabel *getdisklabel __P((char *, int)); static struct disklabel *debug_readlabel __P((int)); static void rewritelabel __P((char *, int, struct disklabel *)); -static int getmaxpartitions __P((void)); static void usage __P((void)); int @@ -432,21 +432,6 @@ rewritelabel(s, fd, lp) #endif } -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) - fatal("getmaxpartitions: %s", strerror(errno)); - - return (maxpart); -} - void usage() { |