summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-01-17 18:50:59 +0100
committerLennart Poettering <lennart@poettering.net>2023-01-18 10:47:17 +0100
commit22ee78a8987f29e7f837efab86ed090ab78c1170 (patch)
treec2de760025b5f30bc7b27ecd48bfa423d1e3960d /src/nspawn
parent05c4c59ff127668ddaa85f0a9fd67cee3c41ce00 (diff)
downloadsystemd-22ee78a8987f29e7f837efab86ed090ab78c1170.tar.gz
loop-util: always tell kernel explicitly about loopback sector size
Let's not leave the sector size unspecified: either set a user supplied value, or auto-detect the right size by probing the disk image accordingly.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 551f8f975c..9f747a72b1 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -5726,6 +5726,7 @@ static int run(int argc, char *argv[]) {
r = loop_device_make_by_path(
arg_image,
arg_read_only ? O_RDONLY : O_RDWR,
+ /* sector_size= */ UINT32_MAX,
FLAGS_SET(dissect_image_flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN,
LOCK_SH,
&loop);