]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: generate friendly error messages for more error conditions
authorLennart Poettering <lennart@poettering.net>
Tue, 21 Feb 2017 15:18:03 +0000 (16:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 21 Feb 2017 20:41:32 +0000 (21:41 +0100)
Fixes: #5408
src/dissect/dissect.c

index 59bd7d9e84642dd6b9305cb0ad797653038d8789..06564e94b16d7d1cf17f3980a7ac3c3b4d1066ea 100644 (file)
@@ -208,6 +208,14 @@ int main(int argc, char *argv[]) {
                 log_error_errno(r, "No root partition for specified root hash found in %s.", arg_image);
                 goto finish;
         }
+        if (r == -ENOTUNIQ) {
+                log_error_errno(r, "Multiple suitable root partitions found in image %s.", arg_image);
+                goto finish;
+        }
+        if (r == -ENXIO) {
+                log_error_errno(r, "No suitable root partition found in image %s.", arg_image);
+                goto finish;
+        }
         if (r < 0) {
                 log_error_errno(r, "Failed to dissect image: %m");
                 goto finish;