summaryrefslogtreecommitdiff
path: root/src/gpt-auto-generator
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-09 22:58:08 +0100
committerLennart Poettering <lennart@poettering.net>2021-03-16 14:57:27 +0100
commitd04faa4e191ac851ca08fbfda0efa89c4087cc99 (patch)
treefa4987bf22805c73fecf1f28127da148fbb8fb2d /src/gpt-auto-generator
parent7cf660302fceba1928df78152fda967480aef19c (diff)
downloadsystemd-d04faa4e191ac851ca08fbfda0efa89c4087cc99.tar.gz
tree-wide: make use of DISSECT_IMAGE_USR_NO_ROOT in various tools
Let's make use of the new dissection in all tools where this makes sense, which are all tools that dissect images, except for those which inherently operate on state/configuraiton and thus where an image without state nor configuration is useless (e.g. systemd-tmpfiles/systemd-firstboot/… --image= switch).
Diffstat (limited to 'src/gpt-auto-generator')
-rw-r--r--src/gpt-auto-generator/gpt-auto-generator.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpt-auto-generator/gpt-auto-generator.c b/src/gpt-auto-generator/gpt-auto-generator.c
index f9d0ca5421..dda9b18815 100644
--- a/src/gpt-auto-generator/gpt-auto-generator.c
+++ b/src/gpt-auto-generator/gpt-auto-generator.c
@@ -665,7 +665,13 @@ static int enumerate_partitions(dev_t devnum) {
if (r <= 0)
return r;
- r = dissect_image(fd, NULL, NULL, DISSECT_IMAGE_GPT_ONLY|DISSECT_IMAGE_NO_UDEV, &m);
+ r = dissect_image(
+ fd,
+ NULL, NULL,
+ DISSECT_IMAGE_GPT_ONLY|
+ DISSECT_IMAGE_NO_UDEV|
+ DISSECT_IMAGE_USR_NO_ROOT,
+ &m);
if (r == -ENOPKG) {
log_debug_errno(r, "No suitable partition table found, ignoring.");
return 0;