dissect: print more useful error messages for two more error cases

This commit is contained in:
Lennart Poettering
2021-10-07 23:07:32 +02:00
parent d888ef68d1
commit a94aa2b9c1
+9
View File
@@ -3269,6 +3269,15 @@ int dissect_image_and_warn(
case -EPROTONOSUPPORT:
return log_error_errno(r, "Device '%s' is loopback block device with partition scanning turned off, please turn it on.", name);
case -EBADR:
return log_error_errno(r,
"Combining partitioned images (such as '%s') with external Verity data (such as '%s') not supported. "
"(Consider setting $SYSTEMD_DISSECT_VERITY_SIDECAR=0 to disable automatic discovery of external Verity data.)",
name, strna(verity ? verity->data_path : NULL));
case -ENOTBLK:
return log_error_errno(r, "Specified image '%s' is not a block device.", name);
default:
if (r < 0)
return log_error_errno(r, "Failed to dissect image '%s': %m", name);