aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/boot/tools/build.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/boot/tools/build.c')
-rw-r--r--arch/x86_64/boot/tools/build.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86_64/boot/tools/build.c b/arch/x86_64/boot/tools/build.c
index 18b5bac1c42..c44f5e2ec10 100644
--- a/arch/x86_64/boot/tools/build.c
+++ b/arch/x86_64/boot/tools/build.c
@@ -178,7 +178,9 @@ int main(int argc, char ** argv)
die("Output: seek failed");
buf[0] = (sys_size & 0xff);
buf[1] = ((sys_size >> 8) & 0xff);
- if (write(1, buf, 2) != 2)
+ buf[2] = ((sys_size >> 16) & 0xff);
+ buf[3] = ((sys_size >> 24) & 0xff);
+ if (write(1, buf, 4) != 4)
die("Write of image length failed");
return 0; /* Everything is OK */