diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2016-12-14 21:11:42 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2016-12-14 21:11:42 +0000 |
commit | 176d3efd2b8fb2824b75a95036bec4d543d548b6 (patch) | |
tree | 02b7d309116b95e47703fe998e522687c484731e /bin | |
parent | e61e40a204c61ae698e92478135a61e44301305c (diff) | |
download | src-176d3efd2b8fb2824b75a95036bec4d543d548b6.tar.gz src-176d3efd2b8fb2824b75a95036bec4d543d548b6.zip |
Put the undocumented df feature of mounting filesystems from device nodes
under an ifdef. Leave enabled.
Reviewed by: cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8513
Notes
Notes:
svn path=/head/; revision=310088
Diffstat (limited to 'bin')
-rw-r--r-- | bin/df/Makefile | 1 | ||||
-rw-r--r-- | bin/df/df.c | 11 |
2 files changed, 11 insertions, 1 deletions
diff --git a/bin/df/Makefile b/bin/df/Makefile index 8f9f5284d94e..c0f2f07b73e1 100644 --- a/bin/df/Makefile +++ b/bin/df/Makefile @@ -9,6 +9,7 @@ PROG= df SRCS= df.c vfslist.c CFLAGS+= -I${MOUNT} +CFLAGS+= -DMOUNT_CHAR_DEVS LIBADD= xo util diff --git a/bin/df/df.c b/bin/df/df.c index 1bcf40d21118..e07df3270356 100644 --- a/bin/df/df.c +++ b/bin/df/df.c @@ -50,7 +50,9 @@ __FBSDID("$FreeBSD$"); #include <sys/stat.h> #include <sys/mount.h> #include <sys/sysctl.h> +#ifdef MOUNT_CHAR_DEVS #include <ufs/ufs/ufsmount.h> +#endif #include <err.h> #include <libutil.h> #include <locale.h> @@ -98,7 +100,9 @@ imax(int a, int b) static int aflag = 0, cflag, hflag, iflag, kflag, lflag = 0, nflag, Tflag; static int thousands; +#ifdef MOUNT_CHAR_DEVS static struct ufs_args mdev; +#endif int main(int argc, char *argv[]) @@ -108,7 +112,10 @@ main(int argc, char *argv[]) struct maxwidths maxwidths; struct statfs *mntbuf; const char *fstype; - char *mntpath, *mntpt; +#ifdef MOUNT_CHAR_DEVS + char *mntpath; +#endif + char *mntpt; const char **vfslist; int i, mntsize; int ch, rv; @@ -227,6 +234,7 @@ main(int argc, char *argv[]) rv = 1; continue; } +#ifdef MOUNT_CHAR_DEVS } else if (S_ISCHR(stbuf.st_mode)) { if ((mntpt = getmntpt(*argv)) == NULL) { mdev.fspec = *argv; @@ -264,6 +272,7 @@ main(int argc, char *argv[]) free(mntpath); continue; } +#endif } else mntpt = *argv; |