diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-02-21 16:18:03 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-21 21:41:32 +0100 |
commit | 94c4c6227957ef34b7f46daaab75bb5911062462 (patch) | |
tree | 3c8acb7f87d2f7d784f9fb7f5101d7f12ca868ff | |
parent | a3d8d68cc1698d014575f0f66c58e253bd46c240 (diff) |
dissect: generate friendly error messages for more error conditions
Fixes: #5408
-rw-r--r-- | src/dissect/dissect.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dissect/dissect.c b/src/dissect/dissect.c index 59bd7d9e84..06564e94b1 100644 --- a/src/dissect/dissect.c +++ b/src/dissect/dissect.c @@ -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; |