mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-25 14:41:19 +00:00
loader/i386/linux: Do not use grub_le_to_cpu32() for relocatable variable
The relocatable variable is defined as grub_uint8_t. Relevant member in setup_header structure is also defined as one byte in Linux boot protocol. By semantic definition it is a bool type. It is not appropriate to treat it as a four bytes. This patch fixes the issue. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
2bcf005298
commit
8fcfd1e0fc
@ -736,7 +736,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
|
|||||||
for (align = 0; align < 32; align++)
|
for (align = 0; align < 32; align++)
|
||||||
if (grub_le_to_cpu32 (lh.kernel_alignment) & (1 << align))
|
if (grub_le_to_cpu32 (lh.kernel_alignment) & (1 << align))
|
||||||
break;
|
break;
|
||||||
relocatable = grub_le_to_cpu32 (lh.relocatable);
|
relocatable = lh.relocatable;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user