summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/mkpiggy.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-03-28 13:11:36 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-03-28 13:11:36 -0700
commita9aff3eaaf0966c2a1bb3717d811363d81e52c76 (patch)
treeb442c3d554ff83529deb1783996f6359aebf07ab /arch/x86/boot/compressed/mkpiggy.c
parente47bb0bda46bf50f81671db502d0c903e0a32604 (diff)
parenta51f4047758d2bcd099ea113b833ed380f4024ba (diff)
Merge branch x86/build into x86/efi and fix up arch/x86/boot/tools/build.c
Reason for merge: The updates to the EFI boot stub generation conflicted with the changes to properly use the get/put_unaligned_le*() macros to generate images. This merge commit completes the conversion in arch/x86/boot/tools/build.c including the places in the code which had been changed on the x86/efi branch. Resolved Conflicts: arch/x86/boot/tools/build.c Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot/compressed/mkpiggy.c')
-rw-r--r--arch/x86/boot/compressed/mkpiggy.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/x86/boot/compressed/mkpiggy.c b/arch/x86/boot/compressed/mkpiggy.c
index 46a82388243..958a641483d 100644
--- a/arch/x86/boot/compressed/mkpiggy.c
+++ b/arch/x86/boot/compressed/mkpiggy.c
@@ -29,14 +29,7 @@
#include <stdio.h>
#include <string.h>
#include <inttypes.h>
-
-static uint32_t getle32(const void *p)
-{
- const uint8_t *cp = p;
-
- return (uint32_t)cp[0] + ((uint32_t)cp[1] << 8) +
- ((uint32_t)cp[2] << 16) + ((uint32_t)cp[3] << 24);
-}
+#include <tools/le_byteshift.h>
int main(int argc, char *argv[])
{
@@ -69,7 +62,7 @@ int main(int argc, char *argv[])
}
ilen = ftell(f);
- olen = getle32(&olen);
+ olen = get_unaligned_le32(&olen);
fclose(f);
/*