discover/paths: Set suffix to default value on error.
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>
Mon, 30 Jul 2018 01:48:26 +0000 (11:48 +1000)
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>
Mon, 30 Jul 2018 04:17:05 +0000 (14:17 +1000)
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

index dcd7b493e129ec134e284f38fdca275cf8768dca..174bdae16581a8084feeeef993bb61e77cc7b1fb 100644 (file)
@@ -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);