]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsblk: follow kernel for inverse tree
authorKarel Zak <kzak@redhat.com>
Wed, 1 Apr 2015 10:06:41 +0000 (12:06 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 1 Apr 2015 10:06:41 +0000 (12:06 +0200)
commit92abdcaee05178e18566d43022a66fc77e3800f2
tree3e0daf673e9a008538139c7456f0311be509ac4e
parent7e786ecae1fff63a1b1b0f9ac37b81e6f9b55123
lsblk: follow kernel for inverse tree

For multi-path devices kernel defines dependence between the device
and whole-list:

$ ls /sys/block/dm-0/slaves/
sdb

but lsblk inserts partition into the tree:

$ lsblk -s -oNAME,KNAME /dev/dm-1
mpatha1   dm-1
└─mpatha  dm-0
  └─sdb1  sdb1     <--- !
    └─sdb sdb

Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/lsblk.c