mirror of
https://github.com/systemd/systemd.git
synced 2025-01-23 02:04:32 +03:00
dissect: generate friendly error messages for more error conditions
Fixes: #5408
This commit is contained in:
parent
a3d8d68cc1
commit
94c4c62279
@ -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);
|
log_error_errno(r, "No root partition for specified root hash found in %s.", arg_image);
|
||||||
goto finish;
|
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) {
|
if (r < 0) {
|
||||||
log_error_errno(r, "Failed to dissect image: %m");
|
log_error_errno(r, "Failed to dissect image: %m");
|
||||||
goto finish;
|
goto finish;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user