For decoding the SOURCE column of a fd opening a block devices, the
origina code uses /proc/partitions only. However, this is not enough
for decoding /dev/nullb0. Though is is a block device node, the block
device behind the node is not listed in /proc/partitions.
This change uses the information min /proc/devices as the fallback of
/proc/partitions.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Reflecting the review comment:
maybe rename DEVNAME to SOURCE as we have here things like 'devtmpfs' etc.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Reflecting the review comment:
add MAJ:MIN for major and minor numbers, remove DEVICE (we use
MAJ:MIN in other tools)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>