]> git.ipfire.org Git - thirdparty/grub.git/commit
luks2: Use more intuitive object name instead of json index in user messages
authorGlenn Washburn <development@efficientek.com>
Tue, 8 Dec 2020 22:45:38 +0000 (16:45 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Sat, 12 Dec 2020 00:19:04 +0000 (01:19 +0100)
commit64691dddb2c21988d1a868543f45e66e8c8e9062
treeb863ba6140f4665a9b8b68527deb9a515a960231
parent1f006c4c053f7f9b374959553be0bda0db528935
luks2: Use more intuitive object name instead of json index in user messages

Use the object name in the json array rather than the 0 based index in the
json array for keyslots, segments, and digests. This is less confusing for
the end user. For example, say you have a LUKS2 device with a key in slot 1
and slot 4. When using the password for slot 4 to unlock the device, the
messages using the index of the keyslot will mention keyslot 1 (its a
zero-based index). Furthermore, with this change the keyslot number will
align with the number used to reference the keyslot when using the
--key-slot argument to cryptsetup.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/luks2.c