Skip to content

Commit

Permalink
dissect: generate friendly error messages for more error conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
poettering committed Feb 21, 2017
1 parent a3d8d68 commit 94c4c62
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/dissect/dissect.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94c4c62

Please sign in to comment.