aboutsummaryrefslogtreecommitdiffstats
path: root/heimdall/source/PrintPitAction.cpp
diff options
context:
space:
mode:
authorBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-05 03:33:12 +1000
committerBenjamin Dobell <benjamin.dobell+git@glassechidna.com.au>2014-05-06 21:39:07 +1000
commita5452e884a1f1119d87e12e42d6ca9745617d054 (patch)
tree747607f94cfc92456a5aa6e86d5cba42290118c5 /heimdall/source/PrintPitAction.cpp
parent0767cff62425ff7b90775e57902e90db8ca09200 (diff)
downloadexternal_heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.zip
external_heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.gz
external_heimdall-a5452e884a1f1119d87e12e42d6ca9745617d054.tar.bz2
Cleaned up command line interface
- Removed the "--delay <ms>" argument. - Improved Action usage info.
Diffstat (limited to 'heimdall/source/PrintPitAction.cpp')
-rw-r--r--heimdall/source/PrintPitAction.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/heimdall/source/PrintPitAction.cpp b/heimdall/source/PrintPitAction.cpp
index 1c8c98a..4ed6e6c 100644
--- a/heimdall/source/PrintPitAction.cpp
+++ b/heimdall/source/PrintPitAction.cpp
@@ -34,10 +34,13 @@ using namespace Heimdall;
const char *PrintPitAction::usage = "Action: print-pit\n\
Arguments: [--file <filename>] [--verbose] [--no-reboot] [--stdout-errors]\n\
- [--delay <ms>] [--usb-log-level <none/error/warning/debug>]\n\
+ [--usb-log-level <none/error/warning/debug>]\n\
Description: Prints the contents of a PIT file in a human readable format. If\n\
a filename is not provided then Heimdall retrieves the PIT file from the \n\
- connected device.\n";
+ connected device.\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 PrintPitAction::Execute(int argc, char **argv)
{
@@ -47,7 +50,6 @@ int PrintPitAction::Execute(int argc, char **argv)
argumentTypes["file"] = kArgumentTypeString;
argumentTypes["no-reboot"] = kArgumentTypeFlag;
argumentTypes["resume"] = kArgumentTypeFlag;
- argumentTypes["delay"] = kArgumentTypeUnsignedInteger;
argumentTypes["verbose"] = kArgumentTypeFlag;
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
argumentTypes["usb-log-level"] = kArgumentTypeString;
@@ -61,7 +63,6 @@ int PrintPitAction::Execute(int argc, char **argv)
}
const StringArgument *fileArgument = static_cast<const StringArgument *>(arguments.GetArgument("file"));
- const UnsignedIntegerArgument *communicationDelayArgument = static_cast<const UnsignedIntegerArgument *>(arguments.GetArgument("delay"));
bool reboot = arguments.GetArgument("no-reboot") == nullptr;
bool resume = arguments.GetArgument("resume") != nullptr;
@@ -155,12 +156,7 @@ int PrintPitAction::Execute(int argc, char **argv)
{
// Print PIT from a 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())