summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Duplichan <scott@notabs.org>2014-12-14 10:59:51 -0600
committerStephen Warren <swarren@nvidia.com>2014-12-15 10:33:44 -0700
commit2eb9a86724db0d86c9ab9b6aeca21d1000d74e78 (patch)
tree63a0d5bed73680286ee80efc22ee9b9d4f7ccfab
parent024108eecd2ef03a843cf42e3d45c0db11e4fc75 (diff)
downloadnvidia-cbootimage-2eb9a86724db0d86c9ab9b6aeca21d1000d74e78.tar.gz
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>
-rw-r--r--src/set.c2
1 files changed, 1 insertions, 1 deletions
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;