From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1klEcJ-0007OA-6B for mharc-grub-devel@gnu.org; Fri, 04 Dec 2020 12:11:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:35838) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klEbM-0007DF-I7 for grub-devel@gnu.org; Fri, 04 Dec 2020 12:10:49 -0500 Received: from mail-il1-x142.google.com ([2607:f8b0:4864:20::142]:43935) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1klEaQ-0006Eg-ED for grub-devel@gnu.org; Fri, 04 Dec 2020 12:10:25 -0500 Received: by mail-il1-x142.google.com with SMTP id z14so5822068ilm.10 for ; Fri, 04 Dec 2020 09:08:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=efficientek-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=d9GLzvzjl6HQlfWAtQc06fAk13wT3+7OxCCHLkyvi6g=; b=gE7od+/CWdMvL41JLArKJfOokMkwHTFn/wmz4rZ7hbQQYPD949c9ghD/d2gb2aIphh +PUCD2Tpf/apdGPh/WIYa89NfR3ZCQIGrUW24979OTEk0aALuVg45gfFW93Zgy4cR+6v 3NQiXggFLrJCvBFM3aIermDcsSRjO28cdkSzxVLFaWqqJtSP3Fs87cYH/GPpjfNrW8gg IYqp/Zakb6aEF+NlmfnNvweMVSKw8BYWK038xFwvdsoUD+G/yTppdh7Chae1vhmFFgiB /Qbn2RswIF+B5anB6t08oBuBGAu3fGQtMBoQhua1glTIEsD62Htthkauh7R4dtQEBbPz hxBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=d9GLzvzjl6HQlfWAtQc06fAk13wT3+7OxCCHLkyvi6g=; b=bKiaaIFJnLIwsF848uNowb9XoDSsS79/RUcVjZ4FKwbuSQ/eAqIXnwg8o7xxiblAVK FqtoQjM2Q0OZN5hsxNqbQ2Nc2zQCplQFIKtglvePZnmrW4phblOD2GneVVIyckgm1Ba8 0ILlaBNgsydgFFlYd5PF1nVo50HoK8LoIRMXjxPHVLa6lXlMxnhpbrkuzbfB7pXuzuCJ dufQ+stXA98FPkXWkxZX/QU9l/WD3BzjpXAFHGoM1ZvqzOQLP31mGNQLXbstErnZundy WEI/H3LwrIfNa3WnBwJHi8Q1z4gwRxLhiyAmZxE9RW3x7uRMDTNA24CYq92pINtZL9sd ZMfg== X-Gm-Message-State: AOAM530AtCOphxDscPTh2qA19oZG23tM2MKoZ5rcWtOzmHKrsHDgj8bt tfohj7VHp1d+xG4iNC/XHFLMJ5g7dGuQcA== X-Google-Smtp-Source: ABdhPJw3fZDV05DFX3u0zaGuYd623okJeRB6OG38HtH+cVclAgau6yKbGQYP9A4CG1y/IV+S7rO5rQ== X-Received: by 2002:a05:6e02:ea5:: with SMTP id u5mr8024971ilj.188.1607100260307; Fri, 04 Dec 2020 08:44:20 -0800 (PST) Received: from localhost.localdomain ([136.49.211.192]) by smtp.gmail.com with ESMTPSA id w3sm1754909iol.9.2020.12.04.08.44.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2020 08:44:19 -0800 (PST) From: Glenn Washburn To: grub-devel@gnu.org Cc: Patrick Steinhardt , Daniel Kiper , 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 Message-Id: <43e3b6cceb7890128f77526d96ff2808c1e6a2d5.1607098915.git.development@efficientek.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::142; envelope-from=development@efficientek.com; helo=mail-il1-x142.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2020 17:10:58 -0000 X-List-Received-Date: Fri, 04 Dec 2020 17:10:58 -0000 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 --- 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