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

From: Pádraig Brady <[email-masked]>
Date: Wed, 25 Jun 2014 09:54:15 +0100

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.