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:
Tianjia Zhang 2021-01-11 11:04:36 +08:00 committed by Daniel Kiper
parent 2bcf005298
commit 8fcfd1e0fc

View File

@ -736,7 +736,7 @@ grub_cmd_linux (grub_command_t cmd __attribute__ ((unused)),
for (align = 0; align < 32; align++)
if (grub_le_to_cpu32 (lh.kernel_alignment) & (1 << align))
break;
relocatable = grub_le_to_cpu32 (lh.relocatable);
relocatable = lh.relocatable;
}
else
{