umount: assume that a non-existing /dev/loop device means it is already detached
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user