summaryrefslogtreecommitdiffstats
path: root/tools/dmsetup.c
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2012-01-11 12:34:44 +0000
committerPeter Rajnoha <prajnoha@redhat.com>2012-01-11 12:34:44 +0000
commit17c3e42b21f816a2c6d88b9c0c11e40bae28af5d (patch)
tree3805a6b3066b0f25b419b1e88d8bb1e601abc5d7 /tools/dmsetup.c
parent2e5ff5d11c362468060df519598f6790f0491ffd (diff)
downloadlvm2-17c3e42b21f816a2c6d88b9c0c11e40bae28af5d.tar.gz
lvm2-17c3e42b21f816a2c6d88b9c0c11e40bae28af5d.tar.xz
lvm2-17c3e42b21f816a2c6d88b9c0c11e40bae28af5d.zip
Add dm_device_get_name to get map name or block device name for given devno.
This is accomplished by reading associated sysfs information. For a dm device, this is /sys/dev/block/major:minor/dm/name (supported in kernel version >= 2.6.29, for older kernels, the behaviour is the same as for non-dm devices). For a non-dm device, this is a readlink on /sys/dev/block/major:minor, e.g. /sys/dev/block/253:0 --> ../../devices/virtual/block/dm-0. The last component of the path is a proper kernel name (block device name). One can request to read only kernel names by setting the 'prefer_kernel_name' argument if needed.
Diffstat (limited to 'tools/dmsetup.c')
0 files changed, 0 insertions, 0 deletions