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

Dave Anderson anderson at redhat.com
Fri Feb 13 15:06:10 UTC 2015



----- Original Message -----
> 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.

Thanks Sam -- queued for crash-7.1.1:

   https://github.com/crash-utility/crash/commit/e43267e888759df0be88c84cab1856666a5d685f

Dave

          
> 
> ---
> 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:
> 
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
> 




More information about the Crash-utility mailing list