From 22ee78a8987f29e7f837efab86ed090ab78c1170 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 17 Jan 2023 18:50:59 +0100 Subject: 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. --- src/dissect/dissect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dissect') diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index 25272c5e1b..df08cc2b74 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -1437,9 +1437,9 @@ static int run(int argc, char *argv[]) { loop_flags = FLAGS_SET(arg_flags, DISSECT_IMAGE_NO_PARTITION_TABLE) ? 0 : LO_FLAGS_PARTSCAN; if (arg_in_memory) - r = loop_device_make_by_path_memory(arg_image, open_flags, loop_flags, LOCK_SH, &d); + r = loop_device_make_by_path_memory(arg_image, open_flags, /* sector_size= */ UINT32_MAX, loop_flags, LOCK_SH, &d); else - r = loop_device_make_by_path(arg_image, open_flags, loop_flags, LOCK_SH, &d); + r = loop_device_make_by_path(arg_image, open_flags, /* sector_size= */ UINT32_MAX, loop_flags, LOCK_SH, &d); if (r < 0) return log_error_errno(r, "Failed to set up loopback device for %s: %m", arg_image); -- cgit v1.2.3