summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorPatrick Venture <venture@google.com>2019-06-28 16:19:11 -0700
committerPatrick Venture <venture@google.com>2019-07-02 19:31:28 +0000
commitd62a3d459b18e0af34c63c246b71a7ef4c4be255 (patch)
tree3517879204df7d6aeb931af139efeabdb99c9b95 /tools
parentcf9b2195a3509b7481cbe564b0fc290c9bfc1475 (diff)
downloadphosphor-ipmi-flash-d62a3d459b18e0af34c63c246b71a7ef4c4be255.tar.gz
phosphor-ipmi-flash-d62a3d459b18e0af34c63c246b71a7ef4c4be255.zip
tools: tweak: add missing newline in progress
Given: The bridge is enabled! Received address: 0x47ff0000 Progress: 100.00%Sending over the hash file. Add the missing newline when the progress output reaches 100%. Signed-off-by: Patrick Venture <venture@google.com> Change-Id: I83f97144fcc6d675e2bace050de81bd0084338d2
Diffstat (limited to 'tools')
-rw-r--r--tools/progress.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/progress.cpp b/tools/progress.cpp
index a395ca3..aafb1de 100644
--- a/tools/progress.cpp
+++ b/tools/progress.cpp
@@ -27,6 +27,9 @@ void ProgressStdoutIndicator::updateProgress(std::int64_t bytes)
currentBytes += bytes;
std::fprintf(stdout, "\rProgress: %.2f%%",
100.0 * currentBytes / totalBytes);
+ if (currentBytes == totalBytes)
+ std::fprintf(stdout, "\n");
+
std::fflush(stdout);
}
OpenPOWER on IntegriCloud