Thread (16 messages) flat view 16 messages, 7 authors, 2019-05-13

RE: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes

From: Alastair D'Silva <hidden>
Date: 2019-05-13 07:36:08
Also in: dri-devel, intel-gfx, linux-fbdev, linux-fsdevel, linux-scsi, linux-wireless, lkml

-----Original Message-----
From: Geert Uytterhoeven <geert@linux-m68k.org>
Sent: Monday, 13 May 2019 5:01 PM
To: Alastair D'Silva <redacted>
Cc: alastair@d-silva.org; Jani Nikula <jani.nikula@linux.intel.com>; Joonas
Lahtinen [off-list ref]; Rodrigo Vivi
[off-list ref]; David Airlie [off-list ref]; Daniel Vetter
[off-list ref]; Dan Carpenter [off-list ref]; Karsten
Keil [off-list ref]; Jassi Brar [off-list ref]; Tom
Lendacky [off-list ref]; David S. Miller
[off-list ref]; Jose Abreu [off-list ref]; Kalle
Valo [off-list ref]; Stanislaw Gruszka [off-list ref];
Benson Leung [off-list ref]; Enric Balletbo i Serra
[off-list ref]; James E.J. Bottomley
[off-list ref]; Martin K. Petersen [off-list ref];
Greg Kroah-Hartman [off-list ref]; Alexander Viro
[off-list ref]; Petr Mladek [off-list ref]; Sergey
Senozhatsky [off-list ref]; Steven Rostedt
[off-list ref]; David Laight [off-list ref]; Andrew
Morton [off-list ref]; Intel Graphics Development <intel-
gfx@lists.freedesktop.org>; DRI Development <dri-
devel@lists.freedesktop.org>; Linux Kernel Mailing List <linux-
kernel@vger.kernel.org>; netdev [off-list ref];
ath10k@lists.infradead.org; linux-wireless [off-list ref];
scsi [off-list ref]; Linux Fbdev development list <linux-
fbdev@vger.kernel.org>; driverdevel [off-list ref]; Linux
FS Devel [off-list ref]
Subject: Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of
repeated bytes

Hi Alastair,

Thanks for your patch!
And thanks for your politeness :)
On Wed, May 8, 2019 at 9:04 AM Alastair D'Silva [off-list ref]
wrote:
quoted
From: Alastair D'Silva <redacted>

Some buffers may only be partially filled with useful data, while the
rest is padded (typically with 0x00 or 0xff).

This patch introduces a flag to allow the supression of lines of
repeated bytes,
Given print_hex_dump() operates on entities of groupsize (1, 2, 4, or 8)
bytes, wouldn't it make more sense to consider repeated groups instead of
repeated bytes?
Maybe, it would mean that subsequent addresses may not be a multiple of rowsize though, which is useful.
quoted
which are replaced with '** Skipped %u bytes of value 0x%x **'
Using a custom message instead of just "*", like "hexdump" uses, will require
preprocessing the output when recovering the original binary data by
feeding it to e.g. "xxd".
This may sound worse than it is, though, as I never got "xxd" to work without
preprocessing anyway ;-)
I think showing the details of the skipped values is useful when reading the output directly. In situations where binary extracts are desired, the feature can always be disabled.

-- 
Alastair D'Silva           mob: 0423 762 819
skype: alastair_dsilva     msn: alastair@d-silva.org
blog: http://alastair.d-silva.org    Twitter: @EvilDeece


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help