]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mountpoint: return dev_t from dir_to_device
authorDave Reisner <d@falconindy.com>
Sun, 9 Oct 2011 03:31:50 +0000 (23:31 -0400)
committerKarel Zak <kzak@redhat.com>
Tue, 18 Oct 2011 12:22:28 +0000 (14:22 +0200)
commite17cd28e600671128f98c2de115d87e6ec810132
tree7dc57a0081864370e1112b355ed211476be1d4be
parent2c73bb01ff6dc637d38224e8688ad8a2ccc0e4bc
mountpoint: return dev_t from dir_to_device

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.

[kzak@redhat.com: - use 0 as dir_to_device() return value on failure]

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mountpoint.c