dissect: generate friendly error messages for more error conditions

Fixes: #5408
This commit is contained in:
Lennart Poettering
2017-02-21 21:41:32 +01:00
parent a3d8d68cc1
commit 94c4c62279
+8
View 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;