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: Bryce Harrington
Subject: bug#37702: Suggestion for 'df' utility
Date: Mon, 1 Jun 2020 09:26:14 -0700

On Mon, Jun 01, 2020 at 09:04:26AM -0700, Bryce Harrington wrote:
> On Sun, May 31, 2020 at 01:49:24PM +0100, Pádraig Brady wrote:
> > On 31/05/2020 10:36, Bernhard Voelker wrote:
> > > 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         \

By the way, I'm told that the snap developers tag their squashfs mounts
with "x-gdu.hide", so if we want to be more precise in what types of
squashfs mount points to exclude filtering on that property might be
one way.

  $ mount | grep squashfs | head -n1
  /var/lib/snapd/snaps/chromium_1143.snap on /snap/chromium/1143 type squashfs 
(ro,nodev,relatime,x-gdu.hide)


Bryce

> > >        || strcmp (Fs_type, "proc") == 0             \
> > >        || strcmp (Fs_type, "subfs") == 0            \
> > >        /* for Linux 2.6/3.x */                      \
> 
> This code appears to be part of gnulib, so I take it the patch would
> need to be added there?  Would it also need updates to any tests, docs,
> or other code?
> 
> You mentioned above this would need an option to override.  I checked
> that `df -a` works as expected, but `df -t squashfs` just says:
> 
>   src/df: no file systems processed
> 
> It looks like -t only works from the filtered fs list, not on the
> excluded dummy systems, so it's a consistent behavior.  However, I do
> agree it could be nice for users to have a way to override the default
> behavior; are you thinking a new option would be added?  If so can you
> outline your thoughts on how that should work?
> 
> Thanks,
> Bryce





reply via email to

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