loop-util: Skip loop_device_set_autoclear() if foreign

This commit is contained in:
Daan De Meyer
2026-04-04 20:03:44 +02:00
committed by Daan De Meyer
parent 235faaad89
commit ba259f5a78
+3
View File
@@ -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;