summaryrefslogtreecommitdiffstats
path: root/misc-utils/lsblk.c
diff options
context:
space:
mode:
authorKarel Zak2018-09-11 09:53:18 +0200
committerKarel Zak2018-09-11 09:53:18 +0200
commit137599ebe152ae10ff6fa492956a65f173623f04 (patch)
treee459055e6009186d8ed19953e7c9c42d73b245b6 /misc-utils/lsblk.c
parentfallocate: add missing semicolon (diff)
downloadkernel-qcow2-util-linux-137599ebe152ae10ff6fa492956a65f173623f04.tar.gz
kernel-qcow2-util-linux-137599ebe152ae10ff6fa492956a65f173623f04.tar.xz
kernel-qcow2-util-linux-137599ebe152ae10ff6fa492956a65f173623f04.zip
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>
Diffstat (limited to 'misc-utils/lsblk.c')
-rw-r--r--misc-utils/lsblk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
index 396220231..15d599cb7 100644
--- a/misc-utils/lsblk.c
+++ b/misc-utils/lsblk.c
@@ -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();