From 4b5de5dd6c930276628c84755d33187e2dfca5cc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 10 Mar 2021 17:41:18 +0100 Subject: dissect-image: split DISSECT_IMAGE_REQUIRE_ROOT in two Previously, the flag did two things at once: enable support for using generic partitions as root fs if there were only one/allow use of partition-table-less images as root fs. And secondly, insist that there was a rootfs, and fail if not. Let's split these two in two separate options so that they can be used independently of each other. There are cases where one wants to use one without the other (i.e. when inspecting things with systemd-dissect tool it should be OK to do so even if image has no root fs), and it's cleaner anyway. --- src/firstboot/firstboot.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/firstboot') diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 8e3028717e..aa7251d1ef 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -1291,7 +1291,11 @@ static int run(int argc, char *argv[]) { r = mount_image_privately_interactively( arg_image, - DISSECT_IMAGE_REQUIRE_ROOT|DISSECT_IMAGE_VALIDATE_OS|DISSECT_IMAGE_RELAX_VAR_CHECK|DISSECT_IMAGE_FSCK, + DISSECT_IMAGE_GENERIC_ROOT | + DISSECT_IMAGE_REQUIRE_ROOT | + DISSECT_IMAGE_VALIDATE_OS | + DISSECT_IMAGE_RELAX_VAR_CHECK | + DISSECT_IMAGE_FSCK, &unlink_dir, &loop_device, &decrypted_image); -- cgit v1.2.1