[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 07/17] luks2: Add string "index" to user strings using a json
From: |
Glenn Washburn |
Subject: |
[PATCH v7 07/17] luks2: Add string "index" to user strings using a json index. |
Date: |
Fri, 4 Dec 2020 10:43:36 -0600 |
This allows error messages to be more easily distinguishable between indexes
and slot keys. The former include the string "index" in the error/debug
string, and the later are surrounded in quotes.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/disk/luks2.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
index ea1065bcf..4be40b22b 100644
--- a/grub-core/disk/luks2.c
+++ b/grub-core/disk/luks2.c
@@ -272,7 +272,7 @@ luks2_get_keyslot (grub_luks2_keyslot_t *k,
grub_luks2_digest_t *d, grub_luks2_s
grub_json_getuint64 (&k->json_slot_key, &keyslot, NULL) ||
grub_json_getchild (&keyslot, &keyslot, 0) ||
luks2_parse_keyslot (k, &keyslot))
- return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse keyslot
%"PRIuGRUB_SIZE, keyslot_idx);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse keyslot index
%"PRIuGRUB_SIZE, keyslot_idx);
/* Get digest that matches the keyslot. */
if (grub_json_getvalue (&digests, root, "digests") ||
@@ -302,7 +302,7 @@ luks2_get_keyslot (grub_luks2_keyslot_t *k,
grub_luks2_digest_t *d, grub_luks2_s
grub_json_getuint64 (&s->json_slot_key, &segment, NULL) ||
grub_json_getchild (&segment, &segment, 0) ||
luks2_parse_segment (s, &segment))
- return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse segment
%"PRIuGRUB_SIZE, i);
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse segment
index %"PRIuGRUB_SIZE, i);
if ((d->segments & (1 << s->json_slot_key)))
break;
--
2.27.0
- Re: [PATCH v7 11/17] cryptodisk: Properly handle non-512 byte sized sectors, (continued)
- [PATCH v7 15/17] mips: Enable __clzdi2(), Glenn Washburn, 2020/12/04
- [PATCH v7 04/17] luks2: Make sure all fields of output argument in luks2_parse_digest() are written to, Glenn Washburn, 2020/12/04
- [PATCH v7 09/17] cryptodisk: Add macros GRUB_TYPE_U_MAX/MIN(type) to replace literals, Glenn Washburn, 2020/12/04
- [PATCH v7 07/17] luks2: Add string "index" to user strings using a json index.,
Glenn Washburn <=
- [PATCH v7 10/17] luks2: grub_cryptodisk_t->total_sectors is the max number of device native sectors, Glenn Washburn, 2020/12/04
- [PATCH v7 01/17] disk: Rename grub_disk_get_size to grub_disk_native_sectors, Glenn Washburn, 2020/12/04
- [PATCH v7 16/17] misc: Add grub_log2ull macro for calculating log base 2 of 64-bit integers, Glenn Washburn, 2020/12/04
- [PATCH v7 13/17] luks2: Error check segment.sector_size, Glenn Washburn, 2020/12/04