summaryrefslogtreecommitdiff
path: root/src/df.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-11-26 07:51:45 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-11-26 07:51:45 +0000
commite9c8be100ea7a0d430fa289564db741d3e3e048e (patch)
tree58b39242cabe12149787873ee9083a2c31778d03 /src/df.c
parentbb14284481603bcff05e03b051ae920e06167318 (diff)
downloadcoreutils-e9c8be100ea7a0d430fa289564db741d3e3e048e.tar.xz
(show_point): Ignore inaccessible file systems.
(usage): -a includes dummy file systems, not size-0 file systems.
Diffstat (limited to 'src/df.c')
-rw-r--r--src/df.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/df.c b/src/df.c
index a40aa6dbc..366aaaa76 100644
--- a/src/df.c
+++ b/src/df.c
@@ -615,8 +615,15 @@ show_point (const char *point, const struct stat *statp)
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\