Second version of the patch (sent to grub-devel in 2008-01-29)

This commit is contained in:
Robert Millan 2010-01-18 14:24:17 +00:00
parent 2c40cc7868
commit c8298743f3
14 changed files with 36 additions and 32 deletions

View file

@ -1,4 +1,4 @@
/* acpi.c - Display acpi. */
/* acpi.c - Display acpi tables. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2008 Free Software Foundation, Inc.
@ -23,20 +23,17 @@
static grub_uint32_t read16 (grub_uint8_t *p)
{
return p[0] | (p[1] << 8);
return grub_le_to_cpu16 (*(grub_uint16_t *)p);
}
static grub_uint32_t read32 (grub_uint8_t *p)
{
return p[0] | (p[1] << 8) | (p[2] << 16) | (p[3] << 24);
return grub_le_to_cpu32 (*(grub_uint32_t *)p);
}
static grub_uint64_t read64 (grub_uint8_t *p)
{
grub_uint32_t l, h;
l = read32(p);
h = read32(p + 4);
return l | (((grub_uint64_t)h) << 32);
return grub_le_to_cpu64 (*(grub_uint64_t *)p);
}
static void