Subject: Re: bug#21372: [PATCH] df: fix prioritize real mounts over bind mounts

From: Dave Chiluk <[email-masked]>
Date: Fri, 11 Sep 2015 14:33:51 -0500

I sent out a revised patch here.
http://lists.gnu.org/archive/html/bug-coreutils/2015-08/msg00087.html

Have you had any chance to take a look at it?

Thanks,
Dave Chiluk

On 08/31/2015 03:11 PM, Dave Chiluk wrote:
> On 08/28/2015 10:44 PM, Pádraig Brady wrote:
>> On 29/08/15 01:37, Pádraig Brady wrote:
>>> On 28/08/15 21:42, Dave Chiluk wrote:
>>
>>>> diff --git a/src/df.c b/src/df.c
>>>> index 2e541b9..13e2661 100644
>>>> --- a/src/df.c
>>>> +++ b/src/df.c
>>>> @@ -652,9 +652,12 @@ filter_mount_list (bool devices_only)
>>>>                else if ((strchr (me->me_devname, '/')
>>>>                         /* let "real" devices with '/' in the name win.  */
>>>>                          && ! strchr (devlist->me->me_devname, '/'))
>>>> -                       /* let a shorter mountdir win.  */
>>>> -                       || (strlen (devlist->me->me_mountdir)
>>>> +                       /* let a shorter mountdir win. */
>>>> +                       /* Only if it's not a bind mount.*/
>>>> +                       || ((strlen (devlist->me->me_mountdir)
>>>>                             > strlen (me->me_mountdir))
>>>> +                          && (strlen (devlist->me->me_mountroot)
>>>> +                           > strlen(me->me_mountroot)))
>>>
>>> I think this should be:       >= strlen (me->me_mountroot)
>>
>> Also we need to cater for NULL me_mountroot.
>>
> 
> All good review suggestions, I'll post a revised patch shortly.
> 
> Dave.
>