loop-util: remember if we created the LoopDevice

Let's store in a bool whether a LoopDevice object was created via
loop_device_open() or loop_device_make().
This commit is contained in:
Lennart Poettering
2023-12-13 17:35:22 +01:00
parent c961a8c605
commit 6bc201343f
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -427,6 +427,7 @@ static int loop_configure(
.timestamp_not_before = timestamp,
.sector_size = c->block_size,
.device_size = device_size,
.created = true,
};
*ret = TAKE_PTR(d);
@@ -989,6 +990,7 @@ int loop_device_open(
.timestamp_not_before = USEC_INFINITY,
.sector_size = sector_size,
.device_size = device_size,
.created = false,
};
*ret = d;