summaryrefslogtreecommitdiff
path: root/riff/DumpArea.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'riff/DumpArea.cpp')
-rw-r--r--riff/DumpArea.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/riff/DumpArea.cpp b/riff/DumpArea.cpp
index 2f7fcf6..29343e7 100644
--- a/riff/DumpArea.cpp
+++ b/riff/DumpArea.cpp
@@ -37,31 +37,30 @@ DumpArea::DumpArea(const char* path, uint64 start, uint64 length, const char* fi
int DumpArea::run(DUT* dut)
{
- logger_.log(Logger::PROGRESS, "Dumping area...");
- logger_.log(Logger::PROGRESS, "Dump path is %s", pchFilePath);
- int error = checkInput();
- if (error == -1) {
- return error;
- }
- error = Flash_DumpArea(dut->getLCDContext(), pchPath, uiStart, uiLength, pchFilePath, uiRedundantArea, iUseBulk);
- if (0 != error)
- {
- logger_.log(Logger::ERROR,"LCD ERROR: Dump area failed %d", error);
- return error;
- }
- // Need a new line braek after the progress bar
- logger_.logRaw("\n");
- logger_.log(Logger::INFO, "Dump area finished successfully");
- return error;
+ logger_.log(Logger::PROGRESS, "Dumping area...");
+ logger_.log(Logger::PROGRESS, "Dump path is %s", pchFilePath);
+ int error = checkInput();
+ if (error == -1) {
+ return error;
+ }
+ error = Flash_DumpArea(dut->getLCDContext(), pchPath, uiStart, uiLength, pchFilePath, uiRedundantArea, iUseBulk);
+ if (0 != error) {
+ logger_.log(Logger::ERR,"LCD ERROR: Dump area failed %d", error);
+ return error;
+ }
+ // Need a new line braek after the progress bar
+ logger_.logRaw("\n");
+ logger_.log(Logger::INFO, "Dump area finished successfully");
+ return error;
}
int DumpArea::checkInput()
{
- if (uiLength <= 0) {
- logger_.log(Logger::ERROR, "Length of the dump not specified. Use -l or --length option");
- return -1;
- }
- return 0;
+ if (uiLength <= 0) {
+ logger_.log(Logger::ERR, "Length of the dump not specified. Use -l or --length option");
+ return -1;
+ }
+ return 0;
}
const char * DumpArea::get_command_name()