From a5452e884a1f1119d87e12e42d6ca9745617d054 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Mon, 5 May 2014 03:33:12 +1000 Subject: Cleaned up command line interface - Removed the "--delay " argument. - Improved Action usage info. --- heimdall/source/DownloadPitAction.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'heimdall/source/DownloadPitAction.cpp') diff --git a/heimdall/source/DownloadPitAction.cpp b/heimdall/source/DownloadPitAction.cpp index abebfae..43325eb 100644 --- a/heimdall/source/DownloadPitAction.cpp +++ b/heimdall/source/DownloadPitAction.cpp @@ -33,9 +33,12 @@ using namespace Heimdall; const char *DownloadPitAction::usage = "Action: download-pit\n\ Arguments: --output [--verbose] [--no-reboot] [--stdout-errors]\n\ - [--delay ] [--usb-log-level ]\n\ + [--usb-log-level ]\n\ Description: Downloads the connected device's PIT file to the specified\n\ - output file.\n"; + output file.\n\ +Note: --no-reboot causes the device to remain in download mode after the action\n\ + is completed. If you wish to perform another action whilst remaining in\n\ + download mode, then the following action must specify the --resume flag."; int DownloadPitAction::Execute(int argc, char **argv) { @@ -45,7 +48,6 @@ int DownloadPitAction::Execute(int argc, char **argv) argumentTypes["output"] = kArgumentTypeString; argumentTypes["no-reboot"] = kArgumentTypeFlag; argumentTypes["resume"] = kArgumentTypeFlag; - argumentTypes["delay"] = kArgumentTypeUnsignedInteger; argumentTypes["verbose"] = kArgumentTypeFlag; argumentTypes["stdout-errors"] = kArgumentTypeFlag; argumentTypes["usb-log-level"] = kArgumentTypeString; @@ -67,8 +69,6 @@ int DownloadPitAction::Execute(int argc, char **argv) return (0); } - const UnsignedIntegerArgument *communicationDelayArgument = static_cast(arguments.GetArgument("delay")); - bool reboot = arguments.GetArgument("no-reboot") == nullptr; bool resume = arguments.GetArgument("resume") != nullptr; bool verbose = arguments.GetArgument("verbose") != nullptr; @@ -130,12 +130,7 @@ int DownloadPitAction::Execute(int argc, char **argv) // Download PIT file from device. - int communicationDelay = BridgeManager::kCommunicationDelayDefault; - - if (communicationDelayArgument) - communicationDelay = communicationDelayArgument->GetValue(); - - BridgeManager *bridgeManager = new BridgeManager(verbose, communicationDelay); + BridgeManager *bridgeManager = new BridgeManager(verbose); bridgeManager->SetUsbLogLevel(usbLogLevel); if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession()) -- cgit v1.1 From 9f957a193701788cac66292daea2c89ed94a033f Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Tue, 6 May 2014 22:52:10 +1000 Subject: Updated copyright notices to 2014 --- heimdall/source/DownloadPitAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/source/DownloadPitAction.cpp') diff --git a/heimdall/source/DownloadPitAction.cpp b/heimdall/source/DownloadPitAction.cpp index 43325eb..845283c 100644 --- a/heimdall/source/DownloadPitAction.cpp +++ b/heimdall/source/DownloadPitAction.cpp @@ -1,4 +1,4 @@ -/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna +/* Copyright (c) 2010-2014 Benjamin Dobell, Glass Echidna Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal -- cgit v1.1 From e6fdafd4829842d96eefa3163b6149265819fe95 Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 11 May 2014 19:26:26 +1000 Subject: Fixed help output alignment. --- heimdall/source/DownloadPitAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/source/DownloadPitAction.cpp') diff --git a/heimdall/source/DownloadPitAction.cpp b/heimdall/source/DownloadPitAction.cpp index 845283c..0bde9d8 100644 --- a/heimdall/source/DownloadPitAction.cpp +++ b/heimdall/source/DownloadPitAction.cpp @@ -38,7 +38,7 @@ Description: Downloads the connected device's PIT file to the specified\n\ output file.\n\ Note: --no-reboot causes the device to remain in download mode after the action\n\ is completed. If you wish to perform another action whilst remaining in\n\ - download mode, then the following action must specify the --resume flag."; + download mode, then the following action must specify the --resume flag."; int DownloadPitAction::Execute(int argc, char **argv) { -- cgit v1.1 From abea6dbbe0456c374b7889d61902023178beb09b Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Thu, 15 May 2014 00:59:13 +1000 Subject: Added missing new lines to CLI help output. --- heimdall/source/DownloadPitAction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'heimdall/source/DownloadPitAction.cpp') diff --git a/heimdall/source/DownloadPitAction.cpp b/heimdall/source/DownloadPitAction.cpp index 0bde9d8..000844e 100644 --- a/heimdall/source/DownloadPitAction.cpp +++ b/heimdall/source/DownloadPitAction.cpp @@ -38,7 +38,7 @@ Description: Downloads the connected device's PIT file to the specified\n\ output file.\n\ Note: --no-reboot causes the device to remain in download mode after the action\n\ is completed. If you wish to perform another action whilst remaining in\n\ - download mode, then the following action must specify the --resume flag."; + download mode, then the following action must specify the --resume flag.\n"; int DownloadPitAction::Execute(int argc, char **argv) { -- cgit v1.1 From 082fb091f1a0cab9d00e82de54fee32b6a1c0c7b Mon Sep 17 00:00:00 2001 From: Benjamin Dobell Date: Sun, 1 Jun 2014 14:09:56 +1000 Subject: 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. --- heimdall/source/DownloadPitAction.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'heimdall/source/DownloadPitAction.cpp') 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); -- cgit v1.1