1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +03:00

dissect: generate friendly error messages for more error conditions

Fixes: #5408
This commit is contained in:
Lennart Poettering 2017-02-21 16:18:03 +01:00
parent a3d8d68cc1
commit 94c4c62279

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;