]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsfd: use the list of block devices in /proc/devices for decoding SOURCE column
authorMasatake YAMATO <yamato@redhat.com>
Wed, 8 Dec 2021 14:41:52 +0000 (23:41 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Wed, 8 Dec 2021 15:39:38 +0000 (00:39 +0900)
commit57d5ee16fffac5265db6a4d6785116358c16b5ea
treed3b4c8b54b4425817d065f56391488188497539f
parent00726e786564fef052fbc356b6435d156cecaf95
lsfd: use the list of block devices in /proc/devices for decoding SOURCE column

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>
misc-utils/lsfd-bdev.c
misc-utils/lsfd.1.adoc
misc-utils/lsfd.c
misc-utils/lsfd.h