lsblk: don't ask udev when --sysroot specified
We use --sysroot to get information about block devices from /proc and /sys dumps. In this case does not make sense to read anything from udev as udevd is about the current system devices. Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
f1a7cfcb1d
commit
137599ebe1
|
@ -562,6 +562,8 @@ static int get_udev_properties(struct blkdev_cxt *cxt)
|
|||
|
||||
if (cxt->probed)
|
||||
return 0; /* already done */
|
||||
if (lsblk->sysroot)
|
||||
return -1; /* don't ask udev when read from data from dump */
|
||||
|
||||
if (!udev)
|
||||
udev = udev_new();
|
||||
|
|
Loading…
Reference in New Issue