[coreboot-gerrit] New patch to review for coreboot: c5669df arm_boot_tools: Add 'b' to fopen flags for Windows compatibility
Scott Duplichan (scott@notabs.org)
gerrit at coreboot.org
Sat Dec 13 04:35:13 CET 2014
Scott Duplichan (scott at notabs.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7790
-gerrit
commit c5669df2dd449a4f4a47f7a6772834776426ebd6
Author: Scott Duplichan <scott at notabs.org>
Date: Fri Dec 12 21:34:04 2014 -0600
arm_boot_tools: Add 'b' to fopen flags for Windows compatibility
Windows requires the 'b' (binary) flag when using fopen to open a
binary file. Otherwise \n characters get expanded to \r\n and <ctrl>z
is treated as end of file.
Change-Id: I3b85e4f9a8f7749801a39154881fe2eedd33f9b8
Signed-off-by: Scott Duplichan <scott at notabs.org>
---
util/arm_boot_tools/mksunxiboot/mksunxiboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/arm_boot_tools/mksunxiboot/mksunxiboot.c b/util/arm_boot_tools/mksunxiboot/mksunxiboot.c
index cb8e8f9..58765b1 100644
--- a/util/arm_boot_tools/mksunxiboot/mksunxiboot.c
+++ b/util/arm_boot_tools/mksunxiboot/mksunxiboot.c
@@ -139,7 +139,7 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}
- fd_in = fopen(argv[1], "r");
+ fd_in = fopen(argv[1], "rb");
if (!fd_in) {
fprintf(stderr, "Cannot open input %s", argv[1]);
return EXIT_FAILURE;
More information about the coreboot-gerrit
mailing list