GNU bug report logs -
#21372
df prioritizes some bind mounts over real ones.
Previous Next
Reported by: Dave Chiluk <chiluk <at> canonical.com>
Date: Fri, 28 Aug 2015 21:09:02 UTC
Severity: normal
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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.
This bug report was last modified 9 years and 241 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.