loop-util: Skip loop_device_set_autoclear() if foreign
This commit is contained in:
committed by
Daan De Meyer
parent
235faaad89
commit
ba259f5a78
@@ -1233,6 +1233,9 @@ int loop_device_set_autoclear(LoopDevice *d, bool autoclear) {
|
||||
|
||||
assert(d);
|
||||
|
||||
if (LOOP_DEVICE_IS_FOREIGN(d))
|
||||
return 0;
|
||||
|
||||
if (ioctl(ASSERT_FD(d->fd), LOOP_GET_STATUS64, &info) < 0)
|
||||
return -errno;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user