Re: [PATCH] - make sure that EFI variable data size is always 64 bit

From: Pavel Machek
Date: Mon Mar 20 2006 - 03:52:36 EST


On Ne 19-03-06 18:43:25, Matthew Garrett wrote:
> The EFI spec states that the data size of an EFI variable is 64 bits.
> "unsigned long", on the other hand, isn't on IA32.
>
> diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
> index bda5bce..488c24c 100644
> --- a/drivers/firmware/efivars.c
> +++ b/drivers/firmware/efivars.c
> @@ -110,7 +110,7 @@ static LIST_HEAD(efivar_list);
> struct efi_variable {
> efi_char16_t VariableName[1024/sizeof(efi_char16_t)];
> efi_guid_t VendorGuid;
> - unsigned long DataSize;
> + __u64 DataSize;
> __u8 Data[1024];
> efi_status_t Status;
> __u32 Attributes;

Please, use u64 (not __u64).

Pavel

--
86: {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/