From: Lennart Poettering Date: Thu, 7 Oct 2021 12:14:02 +0000 (+0200) Subject: dissect: print more useful error messages for two more error cases X-Git-Tag: v250-rc1~548 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a94aa2b9c174b8cbb6a5b3701626f777dd3d1557;p=thirdparty%2Fsystemd.git dissect: print more useful error messages for two more error cases --- diff --git a/src/shared/dissect-image.c b/src/shared/dissect-image.c index c734b9609a6..c3c2185a40d 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);