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/FlashAction.cpp | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'heimdall/source/FlashAction.cpp') diff --git a/heimdall/source/FlashAction.cpp b/heimdall/source/FlashAction.cpp index e951d4e..b528597 100644 --- a/heimdall/source/FlashAction.cpp +++ b/heimdall/source/FlashAction.cpp @@ -39,17 +39,19 @@ using namespace Heimdall; const char *FlashAction::usage = "Action: flash\n\ Arguments:\n\ - --repartition --pit \n\ - --|-- [...]\n\ - [--verbose] [--no-reboot] [--stdout-errors] [--delay ]\n\ - [--usb-log-level ]\n\ + [-- ...]\n\ + [-- ...]\n\ + [--pit ] [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\ + [--usb-log-level ]\n\ or:\n\ - --|-- [...]\n\ - [--pit ]\n\ - [--verbose] [--no-reboot] [--stdout-errors] [--delay ]\n\ - [--usb-log-level ]\n\ + --repartition --pit [-- ...]\n\ + [-- ...] [--verbose] [--no-reboot]\n\ + [--resume] [--stdout-errors] [--usb-log-level ]\n\ Description: Flashes one or more firmware files to your phone. Partition names\n\ (or identifiers) can be obtained by executing the print-pit action.\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.\n\ WARNING: If you're repartitioning it's strongly recommended you specify\n\ all files at your disposal.\n"; @@ -389,7 +391,6 @@ int FlashAction::Execute(int argc, char **argv) argumentTypes["no-reboot"] = kArgumentTypeFlag; argumentTypes["resume"] = kArgumentTypeFlag; - argumentTypes["delay"] = kArgumentTypeUnsignedInteger; argumentTypes["verbose"] = kArgumentTypeFlag; argumentTypes["stdout-errors"] = kArgumentTypeFlag; argumentTypes["usb-log-level"] = kArgumentTypeString; @@ -417,8 +418,6 @@ int FlashAction::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; @@ -497,12 +496,7 @@ int FlashAction::Execute(int argc, char **argv) // Perform flash - 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