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@notabs.org>
Reviewed-on: http://review.coreboot.org/7790
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
This commit is contained in:
Scott Duplichan 2014-12-12 21:34:04 -06:00 committed by Stefan Reinauer
parent 5e2053ea82
commit e1a4dc803a
1 changed files with 1 additions and 1 deletions

View File

@ -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;