summaryrefslogtreecommitdiff
path: root/src/nspawn
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-12-15 17:38:11 +0100
committerLennart Poettering <lennart@poettering.net>2016-12-21 19:09:30 +0100
commite0f9e7bd03eebeb8fdfce7f766c4e254e3586dc8 (patch)
tree05a9df559074b9194fe15b5b6f08dfc0c2af636a /src/nspawn
parentbe30ad41ffd796ba40a5026b4963c17f04cc334d (diff)
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.
Diffstat (limited to 'src/nspawn')
-rw-r--r--src/nspawn/nspawn.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 01d89df1a4..224d30fca6 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -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);