From: Jim Meyering Date: Sat, 3 Jan 1998 16:47:21 +0000 (+0000) Subject: (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1' X-Git-Tag: v4.5.1~8955 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1059e9672167f629e42f730462007cea9c63350c;p=thirdparty%2Fcoreutils.git (show_dev): Treat `fsu.fsu_bavail == (unsigned long) -1' just like `fsu.fsu_blocks == 0' as an indicator that usage information is invalid. This happens with Solaris-5.5.1 CD-ROM partitions. --- diff --git a/src/df.c b/src/df.c index a311f7550a..7db3e763c3 100644 --- a/src/df.c +++ b/src/df.c @@ -259,7 +259,7 @@ show_dev (const char *disk, const char *mount_point, const char *fstype) double blocks_percent_used; uintmax_t blocks_used; - if (fsu.fsu_blocks == 0) + if (fsu.fsu_blocks == 0 || fsu.fsu_bavail == (unsigned long) -1) { blocks_used = 0; fsu.fsu_bavail = 0;