From a94aa2b9c174b8cbb6a5b3701626f777dd3d1557 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 7 Oct 2021 14:14:02 +0200 Subject: [PATCH] dissect: print more useful error messages for two more error cases --- src/shared/dissect-image.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index c734b9609a..c3c2185a40 100644 --- a/src/shared/dissect-image.c +++ b/src/shared/dissect-image.c @@ -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);