mirror of
https://github.com/systemd/systemd.git
synced 2025-03-25 18:50:18 +03:00
dissect-image: wait for udev for single filesystem images too
Single filesystem images are mounted from the /dev/block/X:Y symlink rather than /dev/loopZ, so we need to wait for udev to create it or mounting will be racy and occasionally fail.
This commit is contained in:
parent
a07e962549
commit
b1806441bb
@ -424,11 +424,11 @@ int dissect_image(
|
||||
|
||||
m->encrypted = streq_ptr(fstype, "crypto_LUKS");
|
||||
|
||||
if (!streq(usage, "filesystem")) {
|
||||
r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e);
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
/* Even on a single partition we need to wait for udev to create the
|
||||
* /dev/block/X:Y symlink to /dev/loopZ */
|
||||
r = loop_wait_for_partitions_to_appear(fd, d, 0, flags, &e);
|
||||
if (r < 0)
|
||||
return r;
|
||||
*ret = TAKE_PTR(m);
|
||||
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user