From 2eb9a86724db0d86c9ab9b6aeca21d1000d74e78 Mon Sep 17 00:00:00 2001 From: Scott Duplichan Date: Sun, 14 Dec 2014 10:59:51 -0600 Subject: 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 z as end of file. The change is to support a Windows hosted coreboot build environment. Signed-off-by: Scott Duplichan Signed-off-by: Stephen Warren --- src/set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/set.c b/src/set.c index 0af6686..e8ae3dd 100644 --- a/src/set.c +++ b/src/set.c @@ -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; -- cgit v1.2.1