]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lsblk: split sysfs reading and scols table filling
authorKarel Zak <kzak@redhat.com>
Mon, 15 Oct 2018 11:55:08 +0000 (13:55 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 7 Dec 2018 11:32:57 +0000 (12:32 +0100)
commitf43b8297599e0e871ab569a3ff5d2ce515409aac
treef059f18ca003813566161080d8f642b0080f8deb
parent21d4a48c9cf304e771a7554b54f75df8e8565e34
lsblk: split sysfs reading and scols table filling

This change allows read devices from sysfs only once and reuse device
properties if the device is references more than once in the tree
(RAIDs, etc.).

* every device is in the tree only once (tree->devices list)

* iterate_block_devices() reuse already read devices (for example if
  already read for any dependence)

* the smartscols table is build from the final tree

The patch temporary disables dependencies evaluation (in
process_blkdev() to keep the patch small and simple.

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