From owner-svn-src-all@freebsd.org Wed Dec 14 21:11:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7FDAEC77E7B; Wed, 14 Dec 2016 21:11:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 305DCBFB; Wed, 14 Dec 2016 21:11:43 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBELBgPx019151; Wed, 14 Dec 2016 21:11:42 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBELBga8019149; Wed, 14 Dec 2016 21:11:42 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201612142111.uBELBga8019149@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Wed, 14 Dec 2016 21:11:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310088 - head/bin/df X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2016 21:11:43 -0000 Author: brooks Date: Wed Dec 14 21:11:42 2016 New Revision: 310088 URL: https://svnweb.freebsd.org/changeset/base/310088 Log: 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 Modified: head/bin/df/Makefile head/bin/df/df.c Modified: head/bin/df/Makefile ============================================================================== --- head/bin/df/Makefile Wed Dec 14 20:53:46 2016 (r310087) +++ head/bin/df/Makefile Wed Dec 14 21:11:42 2016 (r310088) @@ -9,6 +9,7 @@ PROG= df SRCS= df.c vfslist.c CFLAGS+= -I${MOUNT} +CFLAGS+= -DMOUNT_CHAR_DEVS LIBADD= xo util Modified: head/bin/df/df.c ============================================================================== --- head/bin/df/df.c Wed Dec 14 20:53:46 2016 (r310087) +++ head/bin/df/df.c Wed Dec 14 21:11:42 2016 (r310088) @@ -50,7 +50,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef MOUNT_CHAR_DEVS #include +#endif #include #include #include @@ -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;