bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: df reports bind mounts creating noisy output


From: Paul Eggert
Subject: Re: df reports bind mounts creating noisy output
Date: Sun, 02 Oct 2005 15:27:08 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Bob Proulx) writes:

> I propose that bind mounts of type "none" be ignored by df when
> listing filesystem information.

That makes a lot of sense to me.  Thanks for reporting it.

Here is a more complete patch to implement this suggestion.  I'm not
installing this now, since there's a feature freeze.  But please
remind us about this after the next release comes out.

2005-10-02  Paul Eggert  <address@hidden>

        * NEWS: Ignore bind mounts by default.
        * doc/coreutils.texi (df invocation): Fix ancient wording about
        file systems with a size of zero blocks.  Nowadays it's merely an
        issue of whether it's a dummy file system.
        * src/df.c (usage): Likewise.
        * lib/mountlist.c (ME_DUMMY) [!defined ME_DUMMY]: Ignore "none"
        file systems.

Index: NEWS
===================================================================
RCS file: /fetish/cu/NEWS,v
retrieving revision 1.319
diff -p -u -r1.319 NEWS
--- NEWS        1 Oct 2005 09:50:09 -0000       1.319
+++ NEWS        2 Oct 2005 22:23:45 -0000
@@ -203,6 +203,8 @@ GNU coreutils NEWS                      
   dd has new iflag= and oflag= flags "binary" and "text", which have an
   effect only on nonstandard platforms that distinguish text from binary I/O.
 
+  df now ignores bind mounts by default; use "-a" to not ignore them.
+
   du accepts new options: --time[=TYPE] and --time-style=STYLE
 
   join now supports a NUL field separator, e.g., "join -t '\0'".
Index: doc/coreutils.texi
===================================================================
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.285
diff -p -u -r1.285 coreutils.texi
--- doc/coreutils.texi  25 Sep 2005 06:08:17 -0000      1.285
+++ doc/coreutils.texi  2 Oct 2005 22:23:47 -0000
@@ -8722,11 +8722,9 @@ The program accepts the following option
 @opindex --all
 @cindex automounter file systems
 @cindex ignore file systems
-Include in the listing file systems that have a size of 0 blocks, which
+Include in the listing dummy file systems, which
 are omitted by default.  Such file systems are typically special-purpose
-pseudo-file-systems, such as automounter entries.  Also, file systems of
-type ``ignore'' or ``auto'', supported by some operating systems, are
-only included if this option is specified.
+pseudo-file-systems, such as automounter entries.
 
 @item -B @var{size}
 @itemx address@hidden
Index: lib/mountlist.c
===================================================================
RCS file: /fetish/cu/lib/mountlist.c,v
retrieving revision 1.55
diff -p -u -r1.55 mountlist.c
--- lib/mountlist.c     22 Sep 2005 06:05:39 -0000      1.55
+++ lib/mountlist.c     2 Oct 2005 22:23:47 -0000
@@ -143,6 +143,7 @@ char *strstr ();
 #ifndef ME_DUMMY
 # define ME_DUMMY(Fs_name, Fs_type)            \
     (strcmp (Fs_type, "autofs") == 0           \
+     || strcmp (Fs_type, "none") == 0          \
      || strcmp (Fs_type, "subfs") == 0         \
      /* for Irix 6.5 */                                \
      || strcmp (Fs_type, "ignore") == 0)
Index: src/df.c
===================================================================
RCS file: /fetish/cu/src/df.c,v
retrieving revision 1.168
diff -p -u -r1.168 df.c
--- src/df.c    16 Aug 2005 20:33:40 -0000      1.168
+++ src/df.c    2 Oct 2005 22:23:47 -0000
@@ -722,7 +722,7 @@ or all file systems by default.\n\
 Mandatory arguments to long options are mandatory for short options too.\n\
 "), stdout);
       fputs (_("\
-  -a, --all             include file systems having 0 blocks\n\
+  -a, --all             include dummy file systems\n\
   -B, --block-size=SIZE use SIZE-byte blocks\n\
   -h, --human-readable  print sizes in human readable format (e.g., 1K 234M 
2G)\n\
   -H, --si              likewise, but use powers of 1000 not 1024\n\




reply via email to

[Prev in Thread] Current Thread [Next in Thread]