]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
loop-util: use ERRNO_IS_DEVICE_ABSENT() macro where appropriate
authorLennart Poettering <lennart@poettering.net>
Tue, 5 Apr 2022 21:34:16 +0000 (23:34 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Apr 2022 16:55:58 +0000 (18:55 +0200)
src/shared/loop-util.c

index 4f9c2de5773c08a353f748bac51c1e3c41625979..257af7340f0bbba35eeae6edd0237993e7001355 100644 (file)
@@ -536,7 +536,7 @@ static int loop_device_make_internal(
                 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 (!IN_SET(errno, ENOENT, ENXIO))
+                        if (!ERRNO_IS_DEVICE_ABSENT(errno))
                                 return -errno;
                 } else {
                         r = loop_configure(loop, nr, &config, &try_loop_configure, &seqnum, &timestamp);