]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(show_dev): Move check for 0-block device (and return if
authorJim Meyering <jim@meyering.net>
Thu, 1 Jan 1998 21:30:00 +0000 (21:30 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 1 Jan 1998 21:30:00 +0000 (21:30 +0000)
not e.g., -a) back up to precede first print stmt.

src/df.c

index f53a0802ada20fe10e211ed8d9ef4235b90cf4ff..a311f7550a73dceca987ab8aa527b42b35b9ac5e 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -213,6 +213,9 @@ show_dev (const char *disk, const char *mount_point, const char *fstype)
       return;
     }
 
+  if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)
+    return;
+
   if (! disk)
     disk = "-";                        /* unknown */
 
@@ -258,8 +261,6 @@ show_dev (const char *disk, const char *mount_point, const char *fstype)
 
       if (fsu.fsu_blocks == 0)
        {
-         if (!show_all_fs && !show_listed_fs)
-           return;
          blocks_used = 0;
          fsu.fsu_bavail = 0;
          blocks_percent_used = 0;