Commit c4f8bd1a authored by Lennart Poettering's avatar Lennart Poettering
Browse files

umount: assume that a non-existing /dev/loop device means it is already detached

parent 973bcd30
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment