From 77ad674b51ceb598aae1adaa7abe572ad0262f39 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 24 Sep 2020 15:08:22 +0200 Subject: [PATCH] loop-util: apparently opening a loop device sometimes results in ENXIO, handle this --- src/shared/loop-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index 8760cc89d97..4843cbcaabc 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -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); -- 2.47.3