diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-25 21:42:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-03-25 21:42:52 +0000 |
commit | aec5da467e448af615371329e3fdafd6b41840f8 (patch) | |
tree | 164035ea6f9f313ef84a3b635edc8d7749366d7b /c/src/lib/libbsp/i386/pc386/tools | |
parent | changed version to rc-19990325 (diff) | |
download | rtems-aec5da467e448af615371329e3fdafd6b41840f8.tar.bz2 |
Patch from Rosimildo DaSilva <rdasilva@connecttel.com>:
Problem: Sometimes the output file "FOO.BT" is smaller that the second
image.
Solution: Opening files, input/output, in "binary mode".
Diffstat (limited to 'c/src/lib/libbsp/i386/pc386/tools')
-rw-r--r-- | c/src/lib/libbsp/i386/pc386/tools/bin2boot.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c b/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c index a47ca2cee3..170452c232 100644 --- a/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c +++ b/c/src/lib/libbsp/i386/pc386/tools/bin2boot.c @@ -69,7 +69,7 @@ int main(int argc, char* argv[]) } ofile = argv[optind]; - ofp = fopen(ofile, "w"); + ofp = fopen(ofile, "wb"); if(ofp == NULL) { fprintf(stderr, "unable to open file %s\n", ofile); @@ -105,7 +105,7 @@ int main(int argc, char* argv[]) /* Copy the first image */ optind++; ifile = argv[optind]; - ifp = fopen(ifile,"r"); + ifp = fopen(ifile,"rb"); if(ifp == NULL) { fprintf(stderr, "unable to open output file %s\n", ifile); @@ -212,7 +212,7 @@ int main(int argc, char* argv[]) /* Copy Second Image */ optind++; ifile = argv[optind]; - ifp = fopen(ifile,"r"); + ifp = fopen(ifile,"rb"); if(ifp == NULL) { fprintf(stderr, "unable to open output file %s\n", ifile); |