[Crash-utility] [PATCH] Remove lkcd_speedo() output spinner

Sam Watters watters.sam at gmail.com
Thu Feb 12 22:04:10 UTC 2015


This patch removes the lkcd_speedo() function and its use.

The lkcd_speedo() function produces a 'spinner' in output when crash is
busy processing kernel crash dump files. The spinner makes the output of
crash commands unpredictable and complicates the parsing of output.  

---
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-12 11:32:19.000000000 -0600
@@ -618,32 +618,6 @@ lkcd_memory_dump(FILE *fp)
 
 }
 
-static void
-lkcd_speedo(void)
-{
-        static int i = 0;
-
-        if (pc->flags & SILENT) {
-                return;
-        }
-
-        switch (++i%4) {
-        case 0:
-                lkcd_print("|\b");
-                break;
-        case 1:
-                lkcd_print("\\\b");
-                break;
-        case 2:
-                lkcd_print("-\b");
-                break;
-        case 3:
-                lkcd_print("/\b");
-                break;
-        }
-	fflush(stdout);
-}
-
 
 /*
  *  The lkcd_lseek() routine does the bulk of the work setting things up 
@@ -856,10 +830,6 @@ lkcd_lseek(physaddr_t paddr)
     lseek(lkcd->fd, lkcd->page_offset_max, SEEK_SET);
     eof = FALSE;
     while (!eof) {
-	if( (i++%2048) == 0) {
-	    lkcd_speedo();
-	}
-
 	switch (lkcd_load_dump_page_header(dp, page))
 	{
 	    case LKCD_DUMPFILE_OK:




More information about the Crash-utility mailing list