]> err.no Git - systemd/commitdiff
umount: assume that a non-existing /dev/loop device means it is already detached
authorLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 04:37:47 +0000 (05:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 14 Mar 2011 14:37:09 +0000 (15:37 +0100)
src/umount.c

index 4fd6b22ad78620e3585985b0a3f9a19989a827b3..6fe0a26dd413278ae704e1037b0466abcdc04429 100644 (file)
@@ -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);