dissect: make using a generic partition as root partition optional
In preparation for reusing the image dissector in the GPT auto-discovery logic, only optionally fail the dissection when we can't identify a root partition. In the GPT auto-discovery we are completely fine with any kind of root, given that we run when it is already mounted and all we do is find some additional auxiliary partitions on the same disk.
This commit is contained in:
+5
-1
@@ -3743,7 +3743,11 @@ int main(int argc, char *argv[]) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
r = dissect_image(loop->fd, arg_root_hash, arg_root_hash_size, 0, &dissected_image);
|
||||
r = dissect_image(
|
||||
loop->fd,
|
||||
arg_root_hash, arg_root_hash_size,
|
||||
DISSECT_IMAGE_REQUIRE_ROOT,
|
||||
&dissected_image);
|
||||
if (r == -ENOPKG) {
|
||||
log_error_errno(r, "Could not find a suitable file system or partition table in image: %s", arg_image);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user