1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-12 09:17:44 +03:00

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

This commit is contained in:
Lennart Poettering 2011-03-14 05:37:47 +01:00
parent 973bcd30bf
commit c4f8bd1aef

View 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);