]> git.ipfire.org Git - thirdparty/grub.git/commit
cryptodisk: Improve handling of partition name in cryptomount password prompt
authorGlenn Washburn <development@efficientek.com>
Thu, 9 Dec 2021 17:14:58 +0000 (11:14 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 23 Dec 2021 01:35:57 +0000 (02:35 +0100)
commitde14c4b36db419761e17bddea90e4b62a0d8e501
tree2faa46f2516f5d80770f4a56cb019d54d349de54
parentebdd82b00ce9d35325b9b46f2a566198f031abe3
cryptodisk: Improve handling of partition name in cryptomount password prompt

Call grub_partition_get_name() unconditionally to initialize the part
variable. Then part will only be NULL when grub_partition_get_name() errors.
Note that when source->partition is NULL, then grub_partition_get_name()
returns an allocated empty string. So no comma or partition will be printed,
as desired.

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