[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 09/18] luks2: Add string "index" to user strings using a j
From: |
Patrick Steinhardt |
Subject: |
Re: [PATCH v8 09/18] luks2: Add string "index" to user strings using a json index. |
Date: |
Sat, 12 Dec 2020 09:11:50 +0100 |
On Tue, Dec 08, 2020 at 04:45:40PM -0600, Glenn Washburn wrote:
> 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>
Nit: the commit subject still has a trailing dot. I guess Daniel can fix
it when applying, though. So:
Reviewed-by: Patrick Steinhardt <ps@pks.im>
> ---
> grub-core/disk/luks2.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/grub-core/disk/luks2.c b/grub-core/disk/luks2.c
> index 7e0419a82..ebf03e77b 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->idx, &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_json_idx);
> + return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse keyslot index
> %"PRIuGRUB_SIZE, keyslot_json_idx);
>
> /* Get digest that matches the keyslot. */
> if (grub_json_getvalue (&digests, root, "digests") ||
> @@ -284,7 +284,7 @@ luks2_get_keyslot (grub_luks2_keyslot_t *k,
> grub_luks2_digest_t *d, grub_luks2_s
> grub_json_getuint64 (&d->idx, &digest, NULL) ||
> grub_json_getchild (&digest, &digest, 0) ||
> luks2_parse_digest (d, &digest))
> - return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse digest
> %"PRIuGRUB_SIZE, json_idx);
> + return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse digest index
> %"PRIuGRUB_SIZE, json_idx);
>
> if ((d->keyslots & (1 << k->idx)))
> break;
> @@ -302,7 +302,7 @@ luks2_get_keyslot (grub_luks2_keyslot_t *k,
> grub_luks2_digest_t *d, grub_luks2_s
> grub_json_getuint64 (&s->idx, &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, json_idx);
> + return grub_error (GRUB_ERR_BAD_ARGUMENT, "Could not parse segment
> index %"PRIuGRUB_SIZE, json_idx);
>
> if ((d->segments & (1 << s->idx)))
> break;
> --
> 2.27.0
>
signature.asc
Description: PGP signature
- [PATCH v8 13/18] cryptodisk: Properly handle non-512 byte sized sectors, (continued)
- [PATCH v8 13/18] cryptodisk: Properly handle non-512 byte sized sectors, Glenn Washburn, 2020/12/08
- [PATCH v8 06/18] luks2: Add idx member to struct grub_luks2_keyslot/segment/digest, Glenn Washburn, 2020/12/08
- [PATCH v8 17/18] misc: Add grub_log2ull macro for calculating log base 2 of 64-bit integers, Glenn Washburn, 2020/12/08
- [PATCH v8 02/18] misc: Add parentheses around ALIGN_UP and ALIGN_DOWN arguments, Glenn Washburn, 2020/12/08
- [PATCH v8 09/18] luks2: Add string "index" to user strings using a json index., Glenn Washburn, 2020/12/08
- [PATCH v8 10/18] cryptodisk: Add macro GRUB_TYPE_BITS() to replace some literals, Glenn Washburn, 2020/12/08
- [PATCH v8 14/18] luks2: Better error handling when setting up the cryptodisk, Glenn Washburn, 2020/12/08
[PATCH v8 15/18] luks2: Error check segment.sector_size, Glenn Washburn, 2020/12/08