diff options
| author | Evan Lojewski <github@meklort.com> | 2019-02-23 13:45:30 -0700 |
|---|---|---|
| committer | Evan Lojewski <github@meklort.com> | 2019-02-23 13:45:30 -0700 |
| commit | bfbf9dbba7f1d88e20cbf9ebea3e18f88d645791 (patch) | |
| tree | d986b5057b85f9fcd6edc86f32c339753be308a9 /utils/bcmflash/main.cpp | |
| parent | 7331bf61ec148545b4879a692aa2ef3f9eb9dc3e (diff) | |
| download | bcm5719-ortega-bfbf9dbba7f1d88e20cbf9ebea3e18f88d645791.tar.gz bcm5719-ortega-bfbf9dbba7f1d88e20cbf9ebea3e18f88d645791.zip | |
Use save_to_file routine for writing modified fw image.
Diffstat (limited to 'utils/bcmflash/main.cpp')
| -rw-r--r-- | utils/bcmflash/main.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/utils/bcmflash/main.cpp b/utils/bcmflash/main.cpp index 09a94c5..ae0dfea 100644 --- a/utils/bcmflash/main.cpp +++ b/utils/bcmflash/main.cpp @@ -288,17 +288,8 @@ int main(int argc, char const *argv[]) if("file" == options["target"]) { // write update file. - fstream outfile; - outfile.open(options["filename"], fstream::out | fstream::binary); - if(outfile.is_open()) + if(!save_to_file(options["filename"].c_str(), (char*)nvram.bytes, NVRAM_SIZE)) { - outfile.write((char*)nvram.bytes, NVRAM_SIZE); - - outfile.close(); - } - else - { - cerr << " Unable to open file '" << options["filename"] << "'" << endl; exit(-1); } } |

