From: Karel Zak Date: Tue, 11 Sep 2018 07:53:18 +0000 (+0200) Subject: lsblk: don't ask udev when --sysroot specified X-Git-Tag: v2.33-rc1~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=137599ebe152ae10ff6fa492956a65f173623f04;p=thirdparty%2Futil-linux.git 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 --- diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c index 396220231a..15d599cb7f 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();