diff options
author | Scott Duplichan <scott@notabs.org> | 2014-12-14 10:59:51 -0600 |
---|---|---|
committer | Stephen Warren <swarren@nvidia.com> | 2014-12-15 10:33:44 -0700 |
commit | 2eb9a86724db0d86c9ab9b6aeca21d1000d74e78 (patch) | |
tree | 63a0d5bed73680286ee80efc22ee9b9d4f7ccfab | |
parent | 024108eecd2ef03a843cf42e3d45c0db11e4fc75 (diff) | |
download | nvidia-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |