1
0
mirror of https://github.com/systemd/systemd.git synced 2025-06-02 17:07:47 +03:00

loop-util: apparently opening a loop device sometimes results in ENXIO, handle this

This commit is contained in:
Lennart Poettering 2020-09-24 15:08:22 +02:00
parent 0950526afd
commit 77ad674b51

View File

@ -198,7 +198,7 @@ int loop_device_make(
if (loop < 0) {
/* Somebody might've gotten the same number from the kernel, used the device,
* and called LOOP_CTL_REMOVE on it. Let's retry with a new number. */
if (errno != ENOENT)
if (!IN_SET(errno, ENOENT, ENXIO))
return -errno;
} else {
r = loop_configure(loop, &config);