aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/DownloadPitAction.cpp
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-06-01 14:09:56 +1000
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-06-01 14:09:56 +1000
commit082fb091f1a0cab9d00e82de54fee32b6a1c0c7b (patch)
treea3e73e4d8b2279c3221a297ac770c96ef92175e2 /heimdall/source/DownloadPitAction.cpp
parent46d9a51e18d260e416479432fec50c6e601eb3ce (diff)
downloadexternal_heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.zip
external_heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.gz
external_heimdall-082fb091f1a0cab9d00e82de54fee32b6a1c0c7b.tar.bz2
Fixed support for large files (up to 2^32 - 1 bytes)
The Loke protocol supports 32-bit unsigned for the size of files being flashed. However, POSIX file commands only support 32-bit (signed). As such we now have platform specific support for larger files.
Diffstat (limited to 'heimdall/source/DownloadPitAction.cpp')
-rw-r--r--heimdall/source/DownloadPitAction.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/heimdall/source/DownloadPitAction.cpp b/heimdall/source/DownloadPitAction.cpp
index 000844e..841afd2 100644
--- a/heimdall/source/DownloadPitAction.cpp
+++ b/heimdall/source/DownloadPitAction.cpp
@@ -120,7 +120,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
// Open output file
const char *outputFilename = outputArgument->GetValue().c_str();
- FILE *outputPitFile = fopen(outputFilename, "wb");
+ FILE *outputPitFile = FileOpen(outputFilename, "wb");
if (!outputPitFile)
{
@@ -135,7 +135,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())
{
- fclose(outputPitFile);
+ FileClose(outputPitFile);
delete bridgeManager;
return (1);
@@ -164,7 +164,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
delete bridgeManager;
- fclose(outputPitFile);
+ FileClose(outputPitFile);
delete [] pitBuffer;
return (success ? 0 : 1);