bug-coreutils
[Top][All Lists]
Advanced

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

bug#16539: More details on df command output for you


From: Pádraig Brady
Subject: bug#16539: More details on df command output for you
Date: Wed, 25 Jun 2014 09:54:15 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 06/25/2014 09:35 AM, Bernhard Voelker wrote:
> On 06/24/2014 06:36 PM, Pádraig Brady wrote:
>> Fingers crossed this is the last df issue.
> 
> +1
> 
>> df is getting quite messy and could do with a refactoring
>> to use prepopulate hashes from /proc/self/mountinfo,
>> but not for this iteration at least.
> 
> Good idea. Maybe we should wait for user feedback (with yet
> other strange test cases) anyway.
> 
> The patch looks perfect, thanks!

I submitted a slightly stale patch to the list.
The one I'll push now has this change.

diff --git a/src/df.c b/src/df.c
index 25a6df5..063cabf 100644
--- a/src/df.c
+++ b/src/df.c
@@ -1168,7 +1168,7 @@ get_disk (char const *disk)
       if (STREQ (disk, devname))
         {
           char *last_device = last_device_for_mount (me->me_mountdir);
-          eclipsed_device = ! STREQ (last_device, devname);
+          eclipsed_device = last_device && ! STREQ (last_device, devname);
           size_t len = strlen (me->me_mountdir);

           if (! eclipsed_device

thanks,
Pádraig.






reply via email to

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