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.
This commit is contained in:
parent
3b5b6826aa
commit
0108c42f59
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue