From: Lennart Poettering Date: Mon, 14 Mar 2011 04:37:47 +0000 (+0100) Subject: umount: assume that a non-existing /dev/loop device means it is already detached X-Git-Tag: v21~95 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4f8bd1aef96063ccc2121fe2429a933a0b2068d;p=systemd umount: assume that a non-existing /dev/loop device means it is already detached --- 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);