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:
parent
973bcd30bf
commit
c4f8bd1aef
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user