FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 02-14-2012, 01:20 PM
Dave Anderson
 
Default s390dbf: Print only ASCII characters in hex_ascii view

----- Original Message -----
> Hi Dave,
>
> Currently the hex_ascii view displays also non ASCII characters.
> Example:
>
> $ s390dbf test hex_ascii
> 00 01328703733:110640 1 - 01 0000000000114288 fb 63 ff fb fc | �c���
>
> To make the output better readable we should only print ASCII
> characters.

Queued for crash-6.0.4.

Thanks,
Dave

>
> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
> ---
> s390dbf.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> --- a/s390dbf.c
> +++ b/s390dbf.c
> @@ -419,10 +419,10 @@ hex_ascii_format_fn(debug_info_t * id, d
> rc += sprintf(out_buf + rc, "| ");
> for (i = 0; i < id->buf_size; i++) {
> unsigned char c = in_buf[i];
> - if (!isprint(c))
> - rc += sprintf(out_buf + rc, ".");
> - else
> + if (isascii(c) && isprint(c))
> rc += sprintf(out_buf + rc, "%c", c);
> + else
> + rc += sprintf(out_buf + rc, ".");
> }
> rc += sprintf(out_buf + rc, "
");
> out:
>
>
> --
> Crash-utility mailing list
> Crash-utility@redhat.com
> https://www.redhat.com/mailman/listinfo/crash-utility
>

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 

Thread Tools




All times are GMT. The time now is 11:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org