diff mbox series

[3/3] discover/paths: Set suffix to default value on error.

Message ID 20180730014826.19097-3-sam@mendozajonas.com
State Accepted
Headers show
Series [1/3] lib/log: Include timestamp prefix | expand

Commit Message

Sam Mendoza-Jonas July 30, 2018, 1:48 a.m. UTC
This avoids the log filling up with "Couldn't recognise suffix" messages
if a lot of partial stdout updates are received.

Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
---
 discover/paths.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/discover/paths.c b/discover/paths.c
index dcd7b49..174bdae 100644
--- a/discover/paths.c
+++ b/discover/paths.c
@@ -186,8 +186,10 @@  static int busybox_progress_cb(void *arg)
 				}
 	}
 
-	if (rc != 3)
+	if (rc != 3) {
 		percentage = size = 0;
+		suffix = ' ';
+	}
 
 	device_handler_status_download(handler, procinfo,
 			percentage, size, suffix);