From: Sascha Wildner Date: Fri, 8 Jun 2012 08:59:23 +0000 (+0200) Subject: Put getmntopts() into libutil and install mntopts.h to /usr/include. X-Git-Tag: v3.2.0~830 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/2dc55a028ad7f68522a47f44ae874279b9d181ab Put getmntopts() into libutil and install mntopts.h to /usr/include. Previously, they were private to sbin/mount and the other mount_* commands would take them from there via their Makefiles. However, puffs related stuff outside base (in pkgsrc for example) couldn't reach them this way. So for now, arrange it like NetBSD has it. --- diff --git a/include/Makefile b/include/Makefile index 0c3b424942..2f56764211 100644 --- a/include/Makefile +++ b/include/Makefile @@ -14,7 +14,7 @@ INCS= a.out.h ar.h assert.h bitstring.h complex.h cpio.h ctype.h db.h \ fts.h ftw.h getopt.h glob.h grp.h histedit.h \ iconv.h ieeefp.h ifaddrs.h iso646.h inttypes.h \ langinfo.h libgen.h limits.h link.h locale.h malloc.h math.h memory.h \ - mpool.h mqueue.h monetary.h ndbm.h netconfig.h \ + mntopts.h mpool.h mqueue.h monetary.h ndbm.h netconfig.h \ netdb.h nl_types.h nlist.h nss.h nsswitch.h objformat.h \ paths.h printf.h pthread.h pthread_np.h pwd.h \ ranlib.h readpassphrase.h regex.h regexp.h \ diff --git a/sbin/mount/mntopts.h b/include/mntopts.h similarity index 95% rename from sbin/mount/mntopts.h rename to include/mntopts.h index b7533afa79..8f53008a32 100644 --- a/sbin/mount/mntopts.h +++ b/include/mntopts.h @@ -32,11 +32,12 @@ * * @(#)mntopts.h 8.7 (Berkeley) 3/29/95 * $FreeBSD: src/sbin/mount/mntopts.h,v 1.16 1999/10/09 11:54:07 phk Exp $ - * $DragonFly: src/sbin/mount/mntopts.h,v 1.4 2005/01/06 03:21:00 cpressey Exp $ */ -#ifndef _MOUNT_MNTOPTS_H_ -#define _MOUNT_MNTOPTS_H_ +#ifndef _MNTOPTS_H_ +#define _MNTOPTS_H_ + +#include struct mntopt { const char *m_option; /* option name */ @@ -52,7 +53,7 @@ struct mntopt { #define MOPT_NOEXEC { "exec", 1, MNT_NOEXEC, 0 } #define MOPT_NOSUID { "suid", 1, MNT_NOSUID, 0 } #define MOPT_NOSYMFOLLOW { "symfollow", 1, MNT_NOSYMFOLLOW, 0 } -#define MOPT_TRIM { "trim", 0, MNT_TRIM, 0 } +#define MOPT_TRIM { "trim", 0, MNT_TRIM, 0 } #define MOPT_RDONLY { "rdonly", 0, MNT_RDONLY, 0 } #define MOPT_SYNC { "sync", 0, MNT_SYNCHRONOUS, 0 } #define MOPT_UNION { "union", 0, MNT_UNION, 0 } @@ -97,9 +98,14 @@ struct mntopt { MOPT_NOCLUSTERW, \ MOPT_IGNORE +extern int getmnt_silent; + +__BEGIN_DECLS +#if __BSD_VISIBLE void getmntopts(const char *, const struct mntopt *, int *, int *); void rmslashes(char *, char *); void checkpath(const char *, char resolved_path[]); -extern int getmnt_silent; +#endif /* __BSD_VISIBLE */ +__END_DECLS -#endif +#endif /* !_MNTOPTS_H_ */ diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index f51b3100c0..defb4635f3 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -11,7 +11,8 @@ SRCS= flopen.c login.c login_tty.c logout.c logwtmp.c logwtmpx.c pty.c \ property.c auth.c \ realhostname.c fparseln.c stub.c pidfile.c trimdomain.c \ dehumanize_number.c humanize_number.c humanize_unsigned.c pw_util.c \ - efun.c + efun.c getmntopts.c + INCS= libutil.h login_cap.h INCSLINKS=libutil.h ${INCLUDEDIR}/util.h WARNS?= 3 @@ -24,7 +25,7 @@ MAN+= flopen.3 login.3 loginx.3 login_auth.3 login_tty.3 logout.3 logwtmp.3 \ _secure_path.3 uucplock.3 property.3 auth.3 realhostname.3 \ realhostname_sa.3 trimdomain.3 fparseln.3 pidfile.3 \ humanize_number.3 humanize_unsigned.3 \ - efun.3 + efun.3 getmntopts.3 MAN+= login.conf.5 auth.conf.5 MLINKS+=auth.3 auth_getval.3 diff --git a/sbin/mount/getmntopts.3 b/lib/libutil/getmntopts.3 similarity index 97% rename from sbin/mount/getmntopts.3 rename to lib/libutil/getmntopts.3 index b96f06775c..aa6c97eb93 100644 --- a/sbin/mount/getmntopts.3 +++ b/lib/libutil/getmntopts.3 @@ -31,16 +31,17 @@ .\" .\" @(#)getmntopts.3 8.3 (Berkeley) 3/30/95 .\" $FreeBSD: src/sbin/mount/getmntopts.3,v 1.6.2.4 2003/02/23 20:17:15 trhodes Exp $ -.\" $DragonFly: src/sbin/mount/getmntopts.3,v 1.2 2003/06/17 04:27:33 dillon Exp $ .\" -.Dd March 30, 1995 +.Dd June 8, 2012 .Dt GETMNTOPTS 3 .Os .Sh NAME .Nm getmntopts .Nd scan mount options +.Sh LIBRARY +.Lb libutil .Sh SYNOPSIS -.Fd #include \&"mntopts.h" +.In mntopts.h .Ft void .Fn getmntopts "char *options" "struct mntopt *mopts" "int *flagp" "int *altflagp" .Sh DESCRIPTION @@ -148,7 +149,7 @@ flag, would also have an entry. This can be declared and used as follows: .Bd -literal -#include "mntopts.h" +#include struct mntopt mopts[] = { MOPT_STDOPTS, diff --git a/sbin/mount/getmntopts.c b/lib/libutil/getmntopts.c similarity index 96% rename from sbin/mount/getmntopts.c rename to lib/libutil/getmntopts.c index f7d175cb2b..710a16eba5 100644 --- a/sbin/mount/getmntopts.c +++ b/lib/libutil/getmntopts.c @@ -32,7 +32,6 @@ * * @(#)getmntopts.c 8.3 (Berkeley) 3/29/95 * $FreeBSD: src/sbin/mount/getmntopts.c,v 1.9 1999/10/09 11:54:06 phk Exp $ - * $DragonFly: src/sbin/mount/getmntopts.c,v 1.4 2004/09/06 01:19:07 dillon Exp $ */ #include @@ -40,12 +39,11 @@ #include #include +#include #include #include #include -#include "mntopts.h" - int getmnt_silent = 0; void @@ -124,7 +122,7 @@ checkpath(const char *path, char *resolved) struct stat sb; if (realpath(path, resolved) != NULL && stat(resolved, &sb) == 0) { - if (!S_ISDIR(sb.st_mode)) + if (!S_ISDIR(sb.st_mode)) errx(EX_USAGE, "%s: not a directory", resolved); } else errx(EX_USAGE, "%s: %s", resolved, strerror(errno)); diff --git a/sbin/mount/Makefile b/sbin/mount/Makefile index 4132ddab57..b1c9d800a3 100644 --- a/sbin/mount/Makefile +++ b/sbin/mount/Makefile @@ -1,10 +1,11 @@ # @(#)Makefile 8.6 (Berkeley) 5/8/95 # $FreeBSD: src/sbin/mount/Makefile,v 1.9.2.1 2001/04/25 10:58:33 ru Exp $ -# $DragonFly: src/sbin/mount/Makefile,v 1.5 2006/10/28 20:42:54 pavalos Exp $ PROG= mount -SRCS= mount.c getmntopts.c vfslist.c +SRCS= mount.c vfslist.c MAN= mount.8 -# We do NOT install the getmntopts.3 man page. + +LDADD= -lutil +DPADD= ${LIBUTIL} .include diff --git a/sbin/mount/mount.c b/sbin/mount/mount.c index 0a4ca5065e..73fa50630b 100644 --- a/sbin/mount/mount.c +++ b/sbin/mount/mount.c @@ -33,7 +33,6 @@ * @(#) Copyright (c) 1980, 1989, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount.c 8.25 (Berkeley) 5/8/95 * $FreeBSD: src/sbin/mount/mount.c,v 1.39.2.3 2001/08/01 08:26:23 obrien Exp $ - * $DragonFly: src/sbin/mount/mount.c,v 1.10 2005/04/03 17:13:08 joerg Exp $ */ #include @@ -49,6 +48,7 @@ #include #include #include +#include #include #include #include @@ -57,7 +57,6 @@ #include #include "extern.h" -#include "mntopts.h" #include "pathnames.h" /* `meta' options */ diff --git a/sbin/mount_cd9660/Makefile b/sbin/mount_cd9660/Makefile index 712de55ad8..fbf02dd8c2 100644 --- a/sbin/mount_cd9660/Makefile +++ b/sbin/mount_cd9660/Makefile @@ -2,13 +2,8 @@ # $FreeBSD: src/sbin/mount_cd9660/Makefile,v 1.4.6.1 2001/04/25 10:58:34 ru Exp $ PROG= mount_cd9660 -SRCS= mount_cd9660.c getmntopts.c MAN= mount_cd9660.8 LDADD= -lutil -lkiconv DPADD= ${LIBUTIL} ${LIBKICONV} -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} - .include diff --git a/sbin/mount_cd9660/mount_cd9660.c b/sbin/mount_cd9660/mount_cd9660.c index e99620927e..cca5877a24 100644 --- a/sbin/mount_cd9660/mount_cd9660.c +++ b/sbin/mount_cd9660/mount_cd9660.c @@ -40,7 +40,6 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95 * $FreeBSD: src/sbin/mount_cd9660/mount_cd9660.c,v 1.15.2.3 2001/03/14 12:05:01 bp Exp $ - * $DragonFly: src/sbin/mount_cd9660/mount_cd9660.c,v 1.5 2005/04/02 21:43:15 dillon Exp $ */ #include @@ -54,6 +53,7 @@ #include #include +#include #include #include #include @@ -61,8 +61,6 @@ #include #include -#include "mntopts.h" - struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_UPDATE, diff --git a/sbin/mount_devfs/Makefile b/sbin/mount_devfs/Makefile index c69db1a3b5..86c61be520 100644 --- a/sbin/mount_devfs/Makefile +++ b/sbin/mount_devfs/Makefile @@ -1,9 +1,7 @@ PROG= mount_devfs -SRCS= mount_devfs.c getmntopts.c MAN= mount_devfs.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} .include diff --git a/sbin/mount_devfs/mount_devfs.c b/sbin/mount_devfs/mount_devfs.c index de6fd07cd2..71da2193b8 100644 --- a/sbin/mount_devfs/mount_devfs.c +++ b/sbin/mount_devfs/mount_devfs.c @@ -31,19 +31,19 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ + #include #include #include #include +#include #include #include #include #include #include -#include "mntopts.h" - #if 0 #define MOPT_UPDATE { "update", 0, MNT_UPDATE, 0 } #endif diff --git a/sbin/mount_ext2fs/Makefile b/sbin/mount_ext2fs/Makefile index cb47003982..62b44656cd 100644 --- a/sbin/mount_ext2fs/Makefile +++ b/sbin/mount_ext2fs/Makefile @@ -1,13 +1,10 @@ # @(#)Makefile 8.3 (Berkeley) 3/27/94 # $FreeBSD: src/sbin/mount_ext2fs/Makefile,v 1.3.6.1 2001/04/25 10:58:34 ru Exp $ -# $DragonFly: src/sbin/mount_ext2fs/Makefile,v 1.4 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_ext2fs -SRCS= mount_ext2fs.c getmntopts.c MAN= mount_ext2fs.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} .include diff --git a/sbin/mount_ext2fs/mount_ext2fs.c b/sbin/mount_ext2fs/mount_ext2fs.c index 43f768d4c0..79fc19c090 100644 --- a/sbin/mount_ext2fs/mount_ext2fs.c +++ b/sbin/mount_ext2fs/mount_ext2fs.c @@ -33,13 +33,13 @@ * @(#) Copyright (c) 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_lfs.c 8.3 (Berkeley) 3/27/94 * $FreeBSD: src/sbin/mount_ext2fs/mount_ext2fs.c,v 1.11 1999/10/09 11:54:09 phk Exp $ - * $DragonFly: src/sbin/mount_ext2fs/mount_ext2fs.c,v 1.7 2005/04/03 15:46:43 joerg Exp $ */ #include #include #include +#include #include #include #include @@ -48,8 +48,6 @@ #include -#include "mntopts.h" - struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_FORCE, diff --git a/sbin/mount_hammer/Makefile b/sbin/mount_hammer/Makefile index 118c6e9591..cc31a757db 100644 --- a/sbin/mount_hammer/Makefile +++ b/sbin/mount_hammer/Makefile @@ -1,12 +1,7 @@ -# -# $DragonFly: src/sbin/mount_hammer/Makefile,v 1.1 2007/10/10 19:35:19 dillon Exp $ - PROG= mount_hammer -SRCS= mount_hammer.c getmntopts.c MAN= mount_hammer.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} .include diff --git a/sbin/mount_hammer/mount_hammer.c b/sbin/mount_hammer/mount_hammer.c index 2893ae1829..ba5328a3fd 100644 --- a/sbin/mount_hammer/mount_hammer.c +++ b/sbin/mount_hammer/mount_hammer.c @@ -30,8 +30,6 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $DragonFly: src/sbin/mount_hammer/mount_hammer.c,v 1.9 2008/07/19 18:48:15 dillon Exp $ */ #include @@ -55,8 +53,7 @@ #include #include #include - -#include "mntopts.h" +#include typedef const char **ary_ptr_t; diff --git a/sbin/mount_hpfs/Makefile b/sbin/mount_hpfs/Makefile index a31fc04284..c0becf181c 100644 --- a/sbin/mount_hpfs/Makefile +++ b/sbin/mount_hpfs/Makefile @@ -1,14 +1,13 @@ # # $FreeBSD: src/sbin/mount_hpfs/Makefile,v 1.1.2.1 2001/04/25 10:58:35 ru Exp $ -# $DragonFly: src/sbin/mount_hpfs/Makefile,v 1.4 2006/10/17 00:55:42 pavalos Exp $ # PROG= mount_hpfs -SRCS= mount_hpfs.c getmntopts.c MAN= mount_hpfs.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+=-I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} + +CFLAGS+=-I${.CURDIR}/../../sys .include diff --git a/sbin/mount_hpfs/mount_hpfs.c b/sbin/mount_hpfs/mount_hpfs.c index e4da55dd56..d5c64235c7 100644 --- a/sbin/mount_hpfs/mount_hpfs.c +++ b/sbin/mount_hpfs/mount_hpfs.c @@ -29,7 +29,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/mount_hpfs/mount_hpfs.c,v 1.1 1999/12/09 19:09:15 semenu Exp $ - * $DragonFly: src/sbin/mount_hpfs/mount_hpfs.c,v 1.8 2005/04/03 18:59:24 joerg Exp $ */ #include @@ -40,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -47,8 +47,6 @@ #include #include -#include "mntopts.h" - static struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_NULL diff --git a/sbin/mount_msdos/Makefile b/sbin/mount_msdos/Makefile index 7b72a3ef74..ee746e80df 100644 --- a/sbin/mount_msdos/Makefile +++ b/sbin/mount_msdos/Makefile @@ -3,13 +3,8 @@ # PROG= mount_msdos -SRCS= mount_msdos.c getmntopts.c MAN= mount_msdos.8 DPADD= ${LIBUTIL} ${LIBKICONV} LDADD= -lutil -lkiconv -MOUNT= ${.CURDIR}/../mount -CFLAGS= -I${MOUNT} -.PATH: ${MOUNT} - .include diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c index d7a4d8a670..914903d228 100644 --- a/sbin/mount_msdos/mount_msdos.c +++ b/sbin/mount_msdos/mount_msdos.c @@ -30,7 +30,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/mount_msdos/mount_msdos.c,v 1.19.2.1 2000/07/20 10:35:13 kris Exp $ - * $DragonFly: src/sbin/mount_msdos/mount_msdos.c,v 1.8 2008/11/02 21:52:46 swildner Exp $ */ #include @@ -45,6 +44,7 @@ #include #include #include +#include #include #include /* must be after stdio to declare fparseln */ @@ -54,8 +54,6 @@ #include #include -#include "mntopts.h" - /* * XXX - no way to specify "foo="-type options; that's what we'd * want for "-u", "-g", "-m", "-L", and "-D". diff --git a/sbin/mount_nfs/Makefile b/sbin/mount_nfs/Makefile index 0b16f83233..305b0644f5 100644 --- a/sbin/mount_nfs/Makefile +++ b/sbin/mount_nfs/Makefile @@ -1,15 +1,16 @@ # @(#)Makefile 8.2 (Berkeley) 3/27/94 # # $FreeBSD: src/sbin/mount_nfs/Makefile,v 1.8.2.1 2001/04/25 10:58:37 ru Exp $ -# $DragonFly: src/sbin/mount_nfs/Makefile,v 1.5 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_nfs -SRCS= mount_nfs.c getmntopts.c mounttab.c +SRCS= mount_nfs.c mounttab.c MAN= mount_nfs.8 -MOUNT= ${.CURDIR}/../mount +LDADD= -lutil +DPADD= ${LIBUTIL} + UMNTALL= ${.CURDIR}/../../usr.sbin/rpc.umntall -CFLAGS+= -DNFS -I${MOUNT} -I${UMNTALL} -.PATH: ${MOUNT} ${UMNTALL} +CFLAGS+= -DNFS -I${UMNTALL} +.PATH: ${UMNTALL} .include diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c index b2d79bdb43..6577a3b4d0 100644 --- a/sbin/mount_nfs/mount_nfs.c +++ b/sbin/mount_nfs/mount_nfs.c @@ -36,7 +36,6 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_nfs.c 8.11 (Berkeley) 5/4/95 * $FreeBSD: src/sbin/mount_nfs/mount_nfs.c,v 1.36.2.6 2003/05/13 14:45:40 trhodes Exp $ - * $DragonFly: src/sbin/mount_nfs/mount_nfs.c,v 1.14 2008/07/14 22:22:40 dillon Exp $ */ #include @@ -59,6 +58,7 @@ #include #include #include +#include #include #include #include @@ -66,7 +66,6 @@ #include #include -#include "mntopts.h" #include "mounttab.h" #define ALTF_BG 0x1 diff --git a/sbin/mount_ntfs/Makefile b/sbin/mount_ntfs/Makefile index edd5e38670..aadaf86c64 100644 --- a/sbin/mount_ntfs/Makefile +++ b/sbin/mount_ntfs/Makefile @@ -3,13 +3,8 @@ # PROG= mount_ntfs -SRCS= mount_ntfs.c getmntopts.c MAN= mount_ntfs.8 DPADD= ${LIBUTIL} ${LIBKICONV} LDADD= -lutil -lkiconv -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} - .include diff --git a/sbin/mount_ntfs/mount_ntfs.c b/sbin/mount_ntfs/mount_ntfs.c index 2d4ac9f8b0..31a69b8456 100644 --- a/sbin/mount_ntfs/mount_ntfs.c +++ b/sbin/mount_ntfs/mount_ntfs.c @@ -29,7 +29,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sbin/mount_ntfs/mount_ntfs.c,v 1.3.2.2 2001/10/12 22:08:43 semenu Exp $ - * $DragonFly: src/sbin/mount_ntfs/mount_ntfs.c,v 1.9 2008/11/02 21:52:46 swildner Exp $ * */ @@ -45,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -53,8 +53,6 @@ #include #include -#include "mntopts.h" - static struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_NULL diff --git a/sbin/mount_null/Makefile b/sbin/mount_null/Makefile index 7b9cd1860f..4d36671076 100644 --- a/sbin/mount_null/Makefile +++ b/sbin/mount_null/Makefile @@ -1,13 +1,12 @@ # @(#)Makefile 8.3 (Berkeley) 3/27/94 # $FreeBSD: src/sbin/mount_null/Makefile,v 1.5.6.1 2001/04/25 10:58:38 ru Exp $ -# $DragonFly: src/sbin/mount_null/Makefile,v 1.4 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_null -SRCS= mount_null.c getmntopts.c MAN= mount_null.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} + +CFLAGS+=-I${.CURDIR}/../../sys .include diff --git a/sbin/mount_null/mount_null.c b/sbin/mount_null/mount_null.c index 9e02b6d607..33afa91bfa 100644 --- a/sbin/mount_null/mount_null.c +++ b/sbin/mount_null/mount_null.c @@ -36,7 +36,6 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_null.c 8.6 (Berkeley) 4/26/95 * $FreeBSD: src/sbin/mount_null/mount_null.c,v 1.13 1999/10/09 11:54:11 phk Exp $ - * $DragonFly: src/sbin/mount_null/mount_null.c,v 1.11 2008/09/18 16:08:31 dillon Exp $ */ #include @@ -44,14 +43,13 @@ #include #include +#include #include #include #include #include #include -#include "mntopts.h" - struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_UPDATE, diff --git a/sbin/mount_nwfs/Makefile b/sbin/mount_nwfs/Makefile index 21374d6e4c..6ddd8eab20 100644 --- a/sbin/mount_nwfs/Makefile +++ b/sbin/mount_nwfs/Makefile @@ -1,15 +1,11 @@ # $FreeBSD: src/sbin/mount_nwfs/Makefile,v 1.1.2.2 2001/04/25 10:58:39 ru Exp $ -# $DragonFly: src/sbin/mount_nwfs/Makefile,v 1.3 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_nwfs -SRCS= mount_nwfs.c getmntopts.c MAN= mount_nwfs.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -DNWFS -I${MOUNT} -.PATH: ${MOUNT} +CFLAGS+= -DNWFS -DPADD= ${LIBNCP} ${LIBIPX} -LDADD= -lncp -lipx +DPADD= ${LIBNCP} ${LIBIPX} ${LIBUTIL} +LDADD= -lncp -lipx -lutil .include diff --git a/sbin/mount_nwfs/mount_nwfs.c b/sbin/mount_nwfs/mount_nwfs.c index ef7bf7e18c..579ee843f5 100644 --- a/sbin/mount_nwfs/mount_nwfs.c +++ b/sbin/mount_nwfs/mount_nwfs.c @@ -30,7 +30,6 @@ * SUCH DAMAGE. * * $FreeBSD: src/sbin/mount_nwfs/mount_nwfs.c,v 1.4.2.1 2000/04/17 08:34:18 bp Exp $ - * $DragonFly: src/sbin/mount_nwfs/mount_nwfs.c,v 1.3 2003/08/08 04:18:40 dillon Exp $ */ #include #include @@ -49,11 +48,11 @@ #include #include #include +#include #include #include #include -#include "mntopts.h" #define NWFS_VFSNAME "nwfs" diff --git a/sbin/mount_portal/Makefile b/sbin/mount_portal/Makefile index 32ca9dbc34..e4c102932c 100644 --- a/sbin/mount_portal/Makefile +++ b/sbin/mount_portal/Makefile @@ -1,14 +1,14 @@ # From: @(#)Makefile 8.3 (Berkeley) 3/27/94 # $FreeBSD: src/sbin/mount_portal/Makefile,v 1.10.2.1 2001/04/25 10:58:39 ru Exp $ -# $DragonFly: src/sbin/mount_portal/Makefile,v 1.3 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_portal -SRCS= mount_portal.c activate.c conf.c getmntopts.c pt_conf.c \ +SRCS= mount_portal.c activate.c conf.c pt_conf.c \ pt_exec.c pt_file.c pt_tcp.c pt_tcplisten.c MAN= mount_portal.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} + +CFLAGS+=-I${.CURDIR}/../../sys .include diff --git a/sbin/mount_portal/mount_portal.c b/sbin/mount_portal/mount_portal.c index 5cc39fb5b9..9f858993a4 100644 --- a/sbin/mount_portal/mount_portal.c +++ b/sbin/mount_portal/mount_portal.c @@ -36,7 +36,6 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_portal.c 8.6 (Berkeley) 4/26/95 * $FreeBSD: src/sbin/mount_portal/mount_portal.c,v 1.16 1999/10/09 11:54:11 phk Exp $ - * $DragonFly: src/sbin/mount_portal/mount_portal.c,v 1.6 2005/11/06 12:36:40 swildner Exp $ */ #include @@ -49,13 +48,13 @@ #include #include +#include #include #include #include #include #include -#include "mntopts.h" #include "pathnames.h" #include "portald.h" diff --git a/sbin/mount_smbfs/Makefile b/sbin/mount_smbfs/Makefile index 6a131b938e..b3d97db2c8 100644 --- a/sbin/mount_smbfs/Makefile +++ b/sbin/mount_smbfs/Makefile @@ -1,13 +1,11 @@ # $FreeBSD: src/sbin/mount_smbfs/Makefile,v 1.1.2.3 2001/12/20 16:28:30 sheldonh Exp $ -# $DragonFly: src/sbin/mount_smbfs/Makefile,v 1.5 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_smbfs SRCS= mount_smbfs.c getmntopts.c MAN= mount_smbfs.8 -MOUNTDIR= ${.CURDIR}/../mount CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs -CFLAGS+= -DSMBFS -I${MOUNTDIR} -I${CONTRIBDIR}/include +CFLAGS+= -DSMBFS -I${CONTRIBDIR}/include LDADD+= -lsmb DPADD+= ${LIBSMB} diff --git a/sbin/mount_std/Makefile b/sbin/mount_std/Makefile index 6b236bb5df..f77d81f666 100644 --- a/sbin/mount_std/Makefile +++ b/sbin/mount_std/Makefile @@ -1,17 +1,14 @@ # @(#)Makefile 8.2 (Berkeley) 3/27/94 # $FreeBSD: src/sbin/mount_std/Makefile,v 1.4.6.5 2003/02/10 12:21:07 des Exp $ -# $DragonFly: src/sbin/mount_std/Makefile,v 1.3 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_std -SRCS= mount_std.c getmntopts.c MAN= mount_std.8 MLINKS= mount_std.8 mount_fdesc.8 \ mount_std.8 mount_linprocfs.8 \ mount_std.8 mount_procfs.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} LINKS= ${BINDIR}/mount_std ${BINDIR}/mount_fdesc \ ${BINDIR}/mount_std ${BINDIR}/mount_linprocfs \ diff --git a/sbin/mount_std/mount_std.c b/sbin/mount_std/mount_std.c index e4c8e88603..5bcd171ebb 100644 --- a/sbin/mount_std/mount_std.c +++ b/sbin/mount_std/mount_std.c @@ -36,21 +36,19 @@ * * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * $FreeBSD: src/sbin/mount_std/mount_std.c,v 1.10.2.1 2001/07/30 10:30:07 dd Exp $ - * $DragonFly: src/sbin/mount_std/mount_std.c,v 1.5 2004/12/18 21:43:39 swildner Exp $ */ #include #include #include +#include #include #include #include #include #include -#include "mntopts.h" - static struct mntopt mopts[] = { MOPT_STDOPTS, { .m_option = NULL } diff --git a/sbin/mount_tmpfs/Makefile b/sbin/mount_tmpfs/Makefile index dbc6abd31a..5313bad8e3 100644 --- a/sbin/mount_tmpfs/Makefile +++ b/sbin/mount_tmpfs/Makefile @@ -1,15 +1,11 @@ PROG= mount_tmpfs -SRCS= mount_tmpfs.c fscopy.c getmntopts.c +SRCS= mount_tmpfs.c fscopy.c MAN= mount_tmpfs.8 LDADD+= -lutil DPADD+= ${LIBUTIL} -MOUNT= ${.CURDIR}/../mount -CFLAGS+=-I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} - NEWFS= ${.CURDIR}/../newfs -CFLAGS+=-I${NEWFS} +CFLAGS+=-I${.CURDIR}/../../sys -I${NEWFS} .PATH: ${NEWFS} .include diff --git a/sbin/mount_tmpfs/mount_tmpfs.c b/sbin/mount_tmpfs/mount_tmpfs.c index dafa4d949d..f5336d9852 100644 --- a/sbin/mount_tmpfs/mount_tmpfs.c +++ b/sbin/mount_tmpfs/mount_tmpfs.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -50,7 +51,6 @@ #include #include "defs.h" -#include "mntopts.h" #include "mount_tmpfs.h" /* --------------------------------------------------------------------- */ diff --git a/sbin/mount_udf/Makefile b/sbin/mount_udf/Makefile index 205e3d3ff1..2d055e7ce8 100644 --- a/sbin/mount_udf/Makefile +++ b/sbin/mount_udf/Makefile @@ -1,11 +1,7 @@ -# $DragonFly: src/sbin/mount_udf/Makefile,v 1.2 2006/10/17 00:55:42 pavalos Exp $ - PROG= mount_udf -SRCS= mount_udf.c getmntopts.c MAN= mount_udf.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} .include diff --git a/sbin/mount_udf/mount_udf.c b/sbin/mount_udf/mount_udf.c index d887dd3482..3525c715b0 100644 --- a/sbin/mount_udf/mount_udf.c +++ b/sbin/mount_udf/mount_udf.c @@ -40,7 +40,6 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_cd9660.c 8.7 (Berkeley) 5/1/95 * $FreeBSD: src/sbin/mount_cd9660/mount_cd9660.c,v 1.15.2.3 2001/03/14 12:05:01 bp Exp $ - * $DragonFly: src/sbin/mount_udf/mount_udf.c,v 1.3 2004/12/18 21:43:39 swildner Exp $ */ #include @@ -51,14 +50,13 @@ #include #include +#include #include #include #include #include #include -#include "mntopts.h" - struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_UPDATE, diff --git a/sbin/mount_ufs/Makefile b/sbin/mount_ufs/Makefile index 8570a225f2..8fe8c15e71 100644 --- a/sbin/mount_ufs/Makefile +++ b/sbin/mount_ufs/Makefile @@ -1,13 +1,15 @@ # @(#)Makefile 8.6 (Berkeley) 5/8/95 # $FreeBSD: src/sbin/mount/Makefile,v 1.9.2.1 2001/04/25 10:58:33 ru Exp $ -# $DragonFly: src/sbin/mount/Makefile,v 1.5 2006/10/28 20:42:54 pavalos Exp $ PROG= mount_ufs -SRCS= mount.c mount_ufs.c getmntopts.c vfslist.c +SRCS= mount.c mount_ufs.c vfslist.c MAN= mount_ufs.8 MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} +CFLAGS+=-I${MOUNT} + +LDADD= -lutil +DPADD= ${LIBUTIL} .PATH: ${MOUNT} diff --git a/sbin/mount_ufs/mount_ufs.c b/sbin/mount_ufs/mount_ufs.c index 6481c3e99f..6f9d8e092b 100644 --- a/sbin/mount_ufs/mount_ufs.c +++ b/sbin/mount_ufs/mount_ufs.c @@ -33,7 +33,6 @@ * @(#) Copyright (c) 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_ufs.c 8.4 (Berkeley) 4/26/95 * $FreeBSD: src/sbin/mount/mount_ufs.c,v 1.16.2.3 2001/08/01 08:27:29 obrien Exp $ - * $DragonFly: src/sbin/mount/mount_ufs.c,v 1.9 2006/10/28 20:42:54 pavalos Exp $ */ #include @@ -42,6 +41,7 @@ #include #include +#include #include #include #include @@ -50,7 +50,6 @@ #include #include "extern.h" -#include "mntopts.h" static void ufs_usage(void); diff --git a/sbin/mount_union/Makefile b/sbin/mount_union/Makefile index c7fa14318c..75c7663c80 100644 --- a/sbin/mount_union/Makefile +++ b/sbin/mount_union/Makefile @@ -1,13 +1,12 @@ # @(#)Makefile 8.3 (Berkeley) 3/27/94 # $FreeBSD: src/sbin/mount_union/Makefile,v 1.6.6.1 2001/04/25 10:58:40 ru Exp $ -# $DragonFly: src/sbin/mount_union/Makefile,v 1.4 2006/10/17 00:55:42 pavalos Exp $ PROG= mount_union -SRCS= mount_union.c getmntopts.c MAN= mount_union.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+= -I${.CURDIR}/../../sys -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} + +CFLAGS+=-I${.CURDIR}/../../sys .include diff --git a/sbin/mount_union/mount_union.c b/sbin/mount_union/mount_union.c index 492d28fcfb..879c03044f 100644 --- a/sbin/mount_union/mount_union.c +++ b/sbin/mount_union/mount_union.c @@ -36,7 +36,6 @@ * @(#) Copyright (c) 1992, 1993, 1994 The Regents of the University of California. All rights reserved. * @(#)mount_union.c 8.5 (Berkeley) 3/27/94 * $FreeBSD: src/sbin/mount_union/mount_union.c,v 1.12 1999/10/09 11:54:14 phk Exp $ - * $DragonFly: src/sbin/mount_union/mount_union.c,v 1.7 2005/04/02 21:42:09 dillon Exp $ */ #include @@ -45,14 +44,13 @@ #include #include +#include #include #include #include #include #include -#include "mntopts.h" - static struct mntopt mopts[] = { MOPT_STDOPTS, MOPT_NULL diff --git a/sbin/newfs/Makefile b/sbin/newfs/Makefile index d94101ae7b..573a275d43 100644 --- a/sbin/newfs/Makefile +++ b/sbin/newfs/Makefile @@ -2,12 +2,13 @@ # $FreeBSD: src/sbin/newfs/Makefile,v 1.6.6.2 2001/04/25 10:58:41 ru Exp $ PROG= newfs -SRCS= getmntopts.c newfs.c mkfs.c fscopy.c +SRCS= newfs.c mkfs.c fscopy.c MAN= newfs.8 -MOUNT= ${.CURDIR}/../mount -CFLAGS+=-DMFS -DFSIRAND -I${MOUNT} -.PATH: ${MOUNT} +LDADD= -lutil +DPADD= ${LIBUTIL} + +CFLAGS+=-DMFS -DFSIRAND LINKS= ${BINDIR}/newfs ${BINDIR}/mount_mfs MLINKS= newfs.8 mount_mfs.8 newfs.8 mfs.8 diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c index bf240ca9a2..d5966915a1 100644 --- a/sbin/newfs/newfs.c +++ b/sbin/newfs/newfs.c @@ -53,6 +53,7 @@ #include #include #include +#include #include #include #include @@ -69,7 +70,6 @@ #include -#include "mntopts.h" #include "defs.h" struct mntopt mopts[] = { diff --git a/share/examples/puffs/pnullfs/Makefile b/share/examples/puffs/pnullfs/Makefile index 26eacae20b..289f927746 100644 --- a/share/examples/puffs/pnullfs/Makefile +++ b/share/examples/puffs/pnullfs/Makefile @@ -1,5 +1,4 @@ PROG= pnullfs -SRCS= pnullfs.c getmntopts.c LDADD+= -lpuffs -lutil DPADD+= ${LIBPUFFS} ${LIBUTIL} @@ -7,12 +6,6 @@ WARNS= 2 NOMAN= 1 -MOUNT= /usr/src/sbin/mount -.PATH: ${MOUNT} -CFLAGS+= -I${MOUNT} - -SRCROOT=${.CURDIR}/../../../.. -DEBUG_FLAGS=-g -O0 -I${SRCROOT}/lib/libpuffs -I${SRCROOT}/sys -LDFLAGS+=-L${SRCROOT}/lib/libpuffs +DEBUG_FLAGS=-g -O0 .include diff --git a/usr.sbin/puffs/Makefile.inc b/usr.sbin/puffs/Makefile.inc index 183e6fe8d2..1f5b79aa2c 100644 --- a/usr.sbin/puffs/Makefile.inc +++ b/usr.sbin/puffs/Makefile.inc @@ -1,12 +1,3 @@ -MOUNT= ${.CURDIR}/../../../sbin/mount - -.PATH: ${MOUNT} - WARNS?= 2 -CFLAGS+=-I${MOUNT} - -LDADD= -lpuffs -DPADD= ${LIBPUFFS} - -.include "${.CURDIR}/../../Makefile.inc" +.include "../Makefile.inc" diff --git a/usr.sbin/puffs/mount_psshfs/Makefile b/usr.sbin/puffs/mount_psshfs/Makefile index 44040c759f..ea03912a9b 100644 --- a/usr.sbin/puffs/mount_psshfs/Makefile +++ b/usr.sbin/puffs/mount_psshfs/Makefile @@ -1,8 +1,8 @@ PROG= mount_psshfs -SRCS= psshfs.c fs.c node.c psbuf.c subr.c getmntopts.c +SRCS= psshfs.c fs.c node.c psbuf.c subr.c +MAN= mount_psshfs.8 + LDADD+= -lpuffs -lutil DPADD+= ${LIBPUFFS} ${LIBUTIL} -MAN= mount_psshfs.8 - .include