On Mon, Feb 20, 2023 at 07:56:29PM +0100, Oliver Steffen wrote:
> Use the new function for printing the partition guid.
>
> Signed-off-by: Oliver Steffen <[email protected]>
This and next patch LGTM...
> ---
> grub-core/commands/probe.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/grub-core/commands/probe.c b/grub-core/commands/probe.c
> index 9a80ea54f..3fe50d11e 100644
> --- a/grub-core/commands/probe.c
> +++ b/grub-core/commands/probe.c
> @@ -104,7 +104,7 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc,
> char **args)
> if (state[6].set)
> {
> /* AAAABBBB-CCCC-DDDD-EEEE-FFFFFFFFFFFF + null terminator */
> - char val[37] = "none";
> + char val[GRUB_GPT_GUID_STR_LEN + 1] = "none";
Good! You are doing what I asked for in the reply earlier... :-)
> if (dev->disk && dev->disk->partition)
> {
> struct grub_partition *p = dev->disk->partition;
> @@ -130,14 +130,7 @@ grub_cmd_probe (grub_extcmd_context_t ctxt, int argc,
> char **args)
> return grub_errno;
> }
> guid = &entry.guid;
> - grub_snprintf (val, sizeof(val),
> - "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
> - grub_le_to_cpu32 (guid->data1),
> - grub_le_to_cpu16 (guid->data2),
> - grub_le_to_cpu16 (guid->data3),
> - guid->data4[0], guid->data4[1], guid->data4[2],
> - guid->data4[3], guid->data4[4], guid->data4[5],
> - guid->data4[6], guid->data4[7]);
> + grub_gpt_part_guid_snprint (val, sizeof(val), guid);
Daniel
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel