coreutils
[Top][All Lists]
Advanced

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

Fix df hanging on excluded file systems


From: Philipp Thomas
Subject: Fix df hanging on excluded file systems
Date: Fri, 10 Mar 2017 07:34:35 +0100
User-agent: Mutt/1.6.2 (2016-07-01)

A customer discovered in coreutils 8.22, that excluding filesystem types
hangs on exactly those, i.e.  'df -x nfs' hangs.  We have a patch that makes
df skip excluded or unselected filesystems in the same way as remote ones
with --local.  Would such a patch be acceptable for you?

The patch is:

--- coreutils-8.22/src/df.c     
+++ coreutils-8.22/src/df.c     
@@ -628,9 +628,12 @@ filter_mount_list (bool devices_only)
          read_file_system_list() could populate me_dev from those
          for efficiency and accuracy.  */
       if ((me->me_remote && show_local_fs)
+          || (!selected_fstype (me->me_type)
+          || excluded_fstype (me->me_type))
           || -1 == stat (me->me_mountdir, &buf))
         {
-          /* If remote, and showing just local, add ME for filtering later.
+          /* If remote, and showing just local, or filesystem type is excluded,
+             add ME for filtering later.
              If stat failed; add ME to be able to complain about it later.  */
           buf.st_dev = me->me_dev;
         }



reply via email to

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