summaryrefslogtreecommitdiff
path: root/src/shared/discover-image.c
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/shared/discover-image.c
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/shared/discover-image.c')
-rw-r--r--src/shared/discover-image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/discover-image.c b/src/shared/discover-image.c
index 1f0f7ca7da..7f1fe4f4dc 100644
--- a/src/shared/discover-image.c
+++ b/src/shared/discover-image.c
@@ -1197,7 +1197,7 @@ int image_read_metadata(Image *i) {
_cleanup_(loop_device_unrefp) LoopDevice *d = NULL;
_cleanup_(dissected_image_unrefp) DissectedImage *m = NULL;
- r = loop_device_make_by_path(i->path, O_RDONLY, LO_FLAGS_PARTSCAN, LOCK_SH, &d);
+ r = loop_device_make_by_path(i->path, O_RDONLY, /* sector_size= */ UINT32_MAX, LO_FLAGS_PARTSCAN, LOCK_SH, &d);
if (r < 0)
return r;