From c4f8bd1aef96063ccc2121fe2429a933a0b2068d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 14 Mar 2011 05:37:47 +0100 Subject: [PATCH] umount: assume that a non-existing /dev/loop device means it is already detached --- src/umount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/umount.c b/src/umount.c index 4fd6b22a..6fe0a26d 100644 --- a/src/umount.c +++ b/src/umount.c @@ -355,7 +355,7 @@ static int delete_loopback(const char *device) { int fd, r; if ((fd = open(device, O_RDONLY|O_CLOEXEC)) < 0) - return -errno; + return errno == ENOENT ? 0 : -errno; r = ioctl(fd, LOOP_CLR_FD, 0); close_nointr_nofail(fd); -- 2.39.5