]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dissect: fix log_debug_errno assert due to r=0
authorLuca Boccassi <luca.boccassi@gmail.com>
Mon, 17 Feb 2025 01:04:33 +0000 (01:04 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 22 Feb 2025 11:15:12 +0000 (12:15 +0100)
systemd-dissect[612]: Assertion '(_error) != 0' failed at src/shared/dissect-image.c:3436, function dissected_image_load_verity_sig_partition(). Aborting.

(cherry picked from commit 135640c140ba32915b97d23e8d6c1cc3fd6c6a2a)

src/shared/dissect-image.c

index 39c5c8a21a2648903c2f5a73189d9032b6807682..f05eb5d03e909c2f15c2f9574fc6222a96bd9fe1 100644 (file)
@@ -3427,7 +3427,7 @@ int dissected_image_load_verity_sig_partition(
                 a = hexmem(root_hash, root_hash_size);
                 b = hexmem(verity->root_hash, verity->root_hash_size);
 
-                return log_debug_errno(r, "Root hash in signature JSON data (%s) doesn't match configured hash (%s).", strna(a), strna(b));
+                return log_debug_errno(SYNTHETIC_ERRNO(EINVAL), "Root hash in signature JSON data (%s) doesn't match configured hash (%s).", strna(a), strna(b));
         }
 
         sig = sd_json_variant_by_key(v, "signature");