Hi,
attached patch opens files in "binary" mode for reading and writing.
That doesn't matter on unix, but on Windows (and maybe Mac OS) there
will be newline conversions that don't belong into binary images.
Signed-off-by: Patrick Georgi <[email protected]>
Patrick
Index: flashrom.c
===================================================================
--- flashrom.c (Revision 881)
+++ flashrom.c (Arbeitskopie)
@@ -834,7 +834,7 @@
printf("Error: No filename specified.\n");
return 1;
}
- if ((image = fopen(filename, "w")) == NULL) {
+ if ((image = fopen(filename, "wb")) == NULL) {
perror(filename);
exit(1);
}
@@ -1154,7 +1154,7 @@
fprintf(stderr, "Continuing anyway.\n");
}
}
- if ((image = fopen(filename, "r")) == NULL) {
+ if ((image = fopen(filename, "rb")) == NULL) {
perror(filename);
programmer_shutdown();
exit(1);
_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom