]> 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, 11 Oct 2011 07:56:07 +0000 (09:56 +0200)
commit7982e85a61889a739c6b3116293e89ba767955dd
tree3c2b8eb5efbde620f7699d1d74b4c809a62eb849
parentf65b3bb6257bb0885fd8bfe3bd6f0f4b2739d4b4
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