Re: [PATCH 1/2] mountpoint: return dev_t from dir_to_device

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

 



On Sat, Oct 08, 2011 at 11:31:50PM -0400, Dave Reisner wrote:
> The string returned from this function was never of much use other than
> to stat the path when the user requested a major:minor pair beyond the
> true/false exit. Save some processing and directly returning the dev_t
> on success, and an impossible value on failure.
> 
> Signed-off-by: Dave Reisner <dreisner@xxxxxxxxxxxxx>
> ---
>  sys-utils/mountpoint.c |   15 +++++++--------
>  1 files changed, 7 insertions(+), 8 deletions(-)
> 

I'll also mention that this fixes an issue with mountpoint that causes
it to throw a false negative when /proc is mounted with a source of
"none". This value is treated specially in libmount and sets the source
to NULL, which makes dir_to_device() incorrectly claim that the directory
is not in fact a mountpoint.

Regards,
dave
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux