diff options
| author | Stanislav Brabec <sbrabec@suse.cz> | 2015-05-25 18:21:36 +0200 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2015-05-26 11:42:38 +0200 |
| commit | d0dc6c17c5025639a7beef8d52792932fd8da0fc (patch) | |
| tree | 8d2e8ae96e6cf1447fb790851baa3769d02a1738 /misc-utils/lsblk.c | |
| parent | 687cc5d58942b24a9f4013c68876d8cbea907ab1 (diff) | |
| download | util-linux-d0dc6c17c5025639a7beef8d52792932fd8da0fc.tar.gz | |
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>
Diffstat (limited to 'misc-utils/lsblk.c')
| -rw-r--r-- | misc-utils/lsblk.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 1b4ffc1286..d826c778f2 100644 --- a/misc-utils/lsblk.c +++ b/misc-utils/lsblk.c @@ -421,6 +421,7 @@ static char *get_device_path(struct blkdev_cxt *cxt) return canonicalize_dm_name(cxt->name); snprintf(path, sizeof(path), "/dev/%s", cxt->name); + sysfs_devname_to_dev_name(path); return xstrdup(path); } |
