bug-coreutils
[Top][All Lists]
Advanced

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

bug#33785: df: don't suppress remote mounts


From: lzhong
Subject: bug#33785: df: don't suppress remote mounts
Date: Tue, 18 Dec 2018 14:42:06 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0

Hi list,

According to the following commit

commit 2e81e62243409c5c574b899f52b08c000e4d99fd
Author: Pádraig Brady <address@hidden>
Date:   Wed Oct 29 02:49:17 2014 +0000

    df: only suppress remote mounts of separate exports with --total

...

diff --git a/NEWS b/NEWS
index 5d3bc58bd..2c7e590e0 100644
--- a/NEWS
+++ b/NEWS
@@ -32,6 +32,11 @@ GNU coreutils NEWS                                    -*- outline -*-

 ** Changes in behavior

+  df no longer suppresses separate exports of the same remote device, as
+  these are generally explicitly mounted.  The --total option does still
+  suppress duplicate remote file systems.
+  [suppression was introduced in coreutils-8.21]

The remote mounts should not be suppressed after this change. However, it turns out

it doesn't work as the message described. The remote mounts are still suppressed. And here is

my patch for this problem:

  1 From 72be959fc9f49420b07b4df5c5017821232cf498 Mon Sep 17 00:00:00 2001
  2 From: Lidong Zhong <address@hidden>
  3 Date: Tue, 18 Dec 2018 14:24:13 +0800
  4 Subject: [PATCH] df: don't suppress remote mounts
  5 MIME-Version: 1.0
  6 Content-Type: text/plain; charset=UTF-8
  7 Content-Transfer-Encoding: 8bit
  8
  9 This is the fix for the following commit.
 10 commit 2e81e62243409c5c574b899f52b08c000e4d99fd
 11 Author: Pádraig Brady <address@hidden>
 12 Date:   Wed Oct 29 02:49:17 2014 +0000
 13
 14     df: only suppress remote mounts of separate exports with --total
 15
 16 It doesn't work as the commit message described. The remote mounts
 17 are also suppressed after this change.
 18 ---
 19  src/df.c | 2 +-
 20  1 file changed, 1 insertion(+), 1 deletion(-)
 21
 22 diff --git a/src/df.c b/src/df.c
 23 index 55532219f..0246e3df9 100644
 24 --- a/src/df.c
 25 +++ b/src/df.c
 26 @@ -722,7 +722,7 @@ filter_mount_list (bool devices_only)
 27                                             < strlen (me->me_mntroot));
 28                if (! print_grand_total
 29                    && me->me_remote && seen_dev->me->me_remote
 30 -                  && ! STREQ (seen_dev->me->me_devname, me->me_devname))
 31 +                  && STREQ (seen_dev->me->me_devname, me->me_devname))
 32                  {
 33                    /* Don't discard remote entries with different locations,  34                       as these are more likely to be explicitly mounted.

Please share your opinion.


Regards,

Lidong






reply via email to

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