]> git.ipfire.org Git - thirdparty/util-linux.git/commit
Fix /sys to /dev node name translation
authorStanislav Brabec <sbrabec@suse.cz>
Mon, 25 May 2015 16:21:36 +0000 (18:21 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 26 May 2015 09:42:38 +0000 (11:42 +0200)
commitd0dc6c17c5025639a7beef8d52792932fd8da0fc
tree8d2e8ae96e6cf1447fb790851baa3769d02a1738
parent687cc5d58942b24a9f4013c68876d8cbea907ab1
Fix /sys to /dev node name translation

linux/drivers/base/core.c: device_get_devnode() defines a translation of
'!' in sysfs nodes to '/' in /dev nodes. The same translation has to be
done to properly support device nodes with slash (e. g. device nodes of
cciss driver and several other drivers).

Introduce new helper sysfs_devname_to_devno() and use it where
appropriate.

Fixes for example lsblk -f on devices using cciss driver.

Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
include/sysfs.h
lib/sysfs.c
libblkid/src/devno.c
misc-utils/lsblk.c