bug-coreutils
[Top][All Lists]
Advanced

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

bug#37702: Suggestion for 'df' utility


From: Pádraig Brady
Subject: bug#37702: Suggestion for 'df' utility
Date: Sun, 31 May 2020 13:49:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:76.0) Gecko/20100101 Thunderbird/76.0

On 31/05/2020 10:36, Bernhard Voelker wrote:
On 2020-05-31 01:07, Paul Eggert wrote:
On 5/30/20 4:49 AM, Erik Auerswald wrote:
I concur that a command line option to override config file (or env var)
settings seems useful if a config file and/or env var approach is used.

Just to mention another alternative to control the behavior besides env 
variables or
config files: it would theoretically also be possible to add a './configure' 
option
to add more file system types to the list of pseudofilesystems at build time.
Obviously, such idea moves the responsibility to the packager - which is not
nice either.

In other utilities we've been moving away from environment variables and/or
config files for the usual security and other-hassle reasons. So I'd prefer
having 'df' just do the "right" thing by default, and to have an option to
override that. The "right" thing should be to ignore all these pseudofilesystems
that hardly anybody cares about.

+1

What about to start with this?

   $ GIT_PAGER= git -C gnulib diff
   diff --git a/lib/mountlist.c b/lib/mountlist.c
   index 7abe0248e..5f6249dec 100644
   --- a/lib/mountlist.c
   +++ b/lib/mountlist.c
   @@ -164,6 +164,9 @@

    #define ME_DUMMY_0(Fs_name, Fs_type)            \
      (strcmp (Fs_type, "autofs") == 0              \
   +   || strcmp (Fs_type, "tmpfs") == 0            \

tmpfs is consumable, so wouldn't be appropriate to add I think

   +   || strcmp (Fs_type, "devtmpfs") == 0         \
   +   || strcmp (Fs_type, "squashfs") == 0         \
       || strcmp (Fs_type, "proc") == 0             \
       || strcmp (Fs_type, "subfs") == 0            \
       /* for Linux 2.6/3.x */                      \







reply via email to

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