[Top][All Lists]
[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: |
Fri, 25 Nov 2005 23:57:43 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
I've installed the patch along the lines that I proposed in early
October about this issue. Here it is again, slightly modified to
also treat inaccessible mounts as dummies, since they can happen
with shadowed mount points.
2005-11-25 Paul Eggert <address@hidden>
* NEWS: df updates for "none", "proc", inaccessible file systems.
* doc/coreutils.texi (df invocation): Document treatment of dummy file
systems better.
* lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are dummies
too.
* src/df.c (show_point): Ignore inaccessible file systems.
(usage): -a includes dummy file systems, not size-0 file systems.
Index: NEWS
===================================================================
RCS file: /fetish/cu/NEWS,v
retrieving revision 1.348
diff -p -u -r1.348 NEWS
--- NEWS 22 Nov 2005 16:23:21 -0000 1.348
+++ NEWS 26 Nov 2005 07:47:22 -0000
@@ -9,6 +9,11 @@ GNU coreutils NEWS
** Changes in behavior
+ df now considers "none" and "proc" file systems to be dummies and
+ therefore does not normally display them. Also, inaccessible file
+ systems (which can be caused by shadowed mount points or by chrooted
+ bind mounts) are now dummies, too.
+
ln now uses different (and we hope clearer) diagnostics when it fails.
ln -v now acts more like FreeBSD, so it generates output only when
successful and the output is easier to parse.
Index: doc/coreutils.texi
===================================================================
RCS file: /fetish/cu/doc/coreutils.texi,v
retrieving revision 1.296
diff -p -u -r1.296 coreutils.texi
--- doc/coreutils.texi 16 Nov 2005 22:45:12 -0000 1.296
+++ doc/coreutils.texi 26 Nov 2005 07:47:24 -0000
@@ -8785,11 +8785,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.56
diff -p -u -r1.56 mountlist.c
--- lib/mountlist.c 26 Nov 2005 07:43:50 -0000 1.56
+++ lib/mountlist.c 26 Nov 2005 07:47:24 -0000
@@ -144,6 +144,8 @@ 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, "proc") == 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.169
diff -p -u -r1.169 df.c
--- src/df.c 15 Oct 2005 09:56:03 -0000 1.169
+++ src/df.c 26 Nov 2005 07:47:25 -0000
@@ -615,8 +615,15 @@ show_point (const char *point, const str
me->me_dev = disk_stats.st_dev;
else
{
- error (0, errno, "%s", quote (me->me_mountdir));
- exit_status = EXIT_FAILURE;
+ /* Report only I/O errors. Other errors might be
+ caused by shadowed mount points, which means POINT
+ can't possibly be on this file system. */
+ if (errno == EIO)
+ {
+ error (0, errno, "%s", quote (me->me_mountdir));
+ exit_status = EXIT_FAILURE;
+ }
+
/* So we won't try and fail repeatedly. */
me->me_dev = (dev_t) -2;
}
@@ -724,7 +731,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\
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: df reports bind mounts creating noisy output,
Paul Eggert <=