[Top][All Lists]

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

Re: [PATCH] df (without any params) omits the root filesystem line

From: Pádraig Brady
Subject: Re: [PATCH] df (without any params) omits the root filesystem line
Date: Mon, 28 Jan 2013 13:05:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1

On 01/28/2013 11:00 AM, Bernhard Voelker wrote:
Hi Padraig,

On 01/27/2013 08:14 PM, Pádraig Brady wrote:
On 01/27/2013 05:51 PM, Bernhard Voelker wrote:
Thanks. Pushed:

Looking at this in detail is still at the end of my TODO list.

Sorry for pushing early.

No worries.

udev is a separate file system here, which now seems not displayed?

I've also noticed that.
This is because devtmpfs is marked as dummy in ME_DUMMY_0 in
mountlist.c. It has been added in December and came into
coreutils with the latest gnulib pull:

Ah right, I was worried it was an unexpected issue with the
patch causing the change.

As for gnulib though, I'm not 100% sure devtmpfs should be marked
as a dummy file system, as there is storage associated with it.
I.E. you can write normal files to /dev and space will be consumed.

Note df already excluded all these new dummy file systems
by default by checking the size like:

  if (fsu.fsu_blocks == 0 && !show_all_fs && !show_listed_fs)

Also do we need to treat rootfs specially in the code now?

Hmm, as a rootfs mount entry will loose against the real "/" entry
comes later, the special handling could be removed again ... but
this would change the behavior for `df -trootfs`, as it wouldn't
be shown there. On the other side, `df -tdevtmpfs` doesn't show
anything either, i.e. for dummy file systems the user would always
have to use the -a option. And this is nothing new.

Therefore, I'm inclined to make df handle rootfs like any other
dummy FS and remove the special treatment as shown in the attachment.

Yes I agree this is better and more consistent.

It's a bit weird though that `df -t devtmpfs` won't show
a devtmpfs file system unless -a is specified.
Maybe -t should imply -a?


reply via email to

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