cbootimage: Add 'b' (binary) flag when using fopen to open a binary file.

Add 'b' (binary) flag when using fopen to open a binary file.
This keeps Windows from expanding \n to \r\n and interpreting
<ctrl>z as end of file. The change is to support a Windows
hosted coreboot build environment.

Signed-off-by: Scott Duplichan <scott@notabs.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
Scott Duplichan 2014-12-14 10:59:51 -06:00 committed by Stephen Warren
parent 024108eecd
commit 2eb9a86724
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ read_from_image(char *filename,
FILE *fp;
struct stat stats;
fp = fopen(filename, "r");
fp = fopen(filename, "rb");
if (fp == NULL) {
result = 1;
return result;