diff options
author | Topi Miettinen <toiwoton@gmail.com> | 2020-03-09 13:01:06 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-10 10:03:57 +0100 |
commit | 0108c42f59dd5848f6b561f260dc6ff3e19d651b (patch) | |
tree | 3a1643d2cbe0bb0a4c7320ec8083e9cce290ac8c /src | |
parent | mount-setup: make /dev noexec (diff) | |
download | systemd-0108c42f59dd5848f6b561f260dc6ff3e19d651b.tar.xz systemd-0108c42f59dd5848f6b561f260dc6ff3e19d651b.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/dissect-image.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index 1ac6549ba5..1ef69fdf4c 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; |