[Crash-utility] [PATCH] RESEND: Suppress lkcd_speedo() spinner in redirected output

Sam Watters watters.sam at gmail.com
Wed Feb 11 21:04:57 UTC 2015


Resent using a benign email client

When redirecting output to a file or script the 'spinner' written by the
lkcd_speedo() function complicates parsing output.

Currently the spinner is only suppressed if crash is run with the '-s'
option or the command 'set silent on' has been executed. The change in
this patch suppresses the spinner when the output is redirected to a
pipe or file.

---
diff -Nurp crash-7.1.0//lkcd_common.c crash-7.1.0+//lkcd_common.c
--- crash-7.1.0//lkcd_common.c	2015-02-06 12:44:11.000000000 -0600
+++ crash-7.1.0+//lkcd_common.c	2015-02-11 13:50:11.000000000 -0600
@@ -623,7 +623,8 @@ lkcd_speedo(void)
 {
         static int i = 0;
 
-        if (pc->flags & SILENT) {
+        if (pc->flags & SILENT ||
+			pc->redirect & (REDIRECT_TO_PIPE | REDIRECT_TO_FILE)) {
                 return;
         }
 




More information about the Crash-utility mailing list