From: Topi Miettinen Date: Mon, 9 Mar 2020 12:01:06 +0000 (+0200) Subject: dissect-image: avoid scanning partitions X-Git-Tag: v246-rc1~769 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0108c42f59dd5848f6b561f260dc6ff3e19d651b;p=thirdparty%2Fsystemd.git dissect-image: avoid scanning partitions In case the dissected image has a filesystem, don't scan for partitions. This avoids problems with services using a `RootImage=` in early boot when udevd is not yet started. --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 1ac6549ba54..1ef69fdf4c8 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -425,10 +425,11 @@ int dissect_image( m->encrypted = streq_ptr(fstype, "crypto_LUKS"); - r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e); - if (r < 0) - return r; - + if (!streq(usage, "filesystem")) { + r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e); + if (r < 0) + return r; + } *ret = TAKE_PTR(m); return 0;