]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: print more useful error messages for two more error cases
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Oct 2021 12:14:02 +0000 (14:14 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 7 Oct 2021 21:07:32 +0000 (23:07 +0200)
src/shared/dissect-image.c

index c734b9609a639966b689b4bf82c03812114d6365..c3c2185a40d8d0f5c92974e40336709fbbb4d1fa 100644 (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);