gpt_partition contains grub_guid. We need to decide whether the whole structure is unaligned and then we need to use packed_guid. But we never have unaligned part entries as we read them in an aligned buffer from disk. Hence just make it all aligned.
Signed-off-by: Vladimir Serbinenko <phco...@gmail.com> -- Regards Vladimir 'phcoder' Serbinenko
From 1c804f57fe25f1fbea7a933eec99fe1e20a23065 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko <phco...@gmail.com> Date: Tue, 31 Oct 2023 18:24:09 +0100 Subject: [PATCH 2/4] gpt_partition: Mark grub_gpt_partentry as having natural alignment gpt_partition contains grub_guid. We need to decide whether the whole structure is unaligned and then we need to use packed_guid. But we never have unaligned part entries as we read them in an aligned buffer from disk. Hence just make it all aligned. Signed-off-by: Vladimir Serbinenko <phco...@gmail.com> --- include/grub/gpt_partition.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grub/gpt_partition.h b/include/grub/gpt_partition.h index 020e71920..292ea03f1 100644 --- a/include/grub/gpt_partition.h +++ b/include/grub/gpt_partition.h @@ -67,7 +67,7 @@ struct grub_gpt_partentry grub_uint64_t end; grub_uint64_t attrib; char name[72]; -} GRUB_PACKED; +}; grub_err_t grub_gpt_partition_map_iterate (grub_disk_t disk, -- 2.39.2
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel