From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alastair D'Silva" Subject: RE: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes Date: Mon, 13 May 2019 17:35:47 +1000 Message-ID: <04de01d5095e$7f6af730$7e40e590$@d-silva.org> References: <20190508070148.23130-1-alastair@au1.ibm.com> <20190508070148.23130-4-alastair@au1.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: Content-Language: en-au Sender: linux-wireless-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: 'Geert Uytterhoeven' , 'Alastair D'Silva' Cc: 'Jani Nikula' , 'Joonas Lahtinen' , 'Rodrigo Vivi' , 'David Airlie' , 'Daniel Vetter' , 'Dan Carpenter' , 'Karsten Keil' , 'Jassi Brar' , 'Tom Lendacky' , "'David S. Miller'" , 'Jose Abreu' , 'Kalle Valo' , 'Stanislaw Gruszka' , 'Benson Leung' , 'Enric Balletbo i Serra' , "'James E.J. Bottomley'" , "'Martin K. Petersen'" List-Id: intel-gfx@lists.freedesktop.org > -----Original Message----- > From: Geert Uytterhoeven > Sent: Monday, 13 May 2019 5:01 PM > To: Alastair D'Silva > Cc: alastair-fCx97xH5QTlAfugRpC6u6w@public.gmane.org; Jani Nikula ; = Joonas > Lahtinen ; Rodrigo Vivi > ; David Airlie ; Daniel = Vetter > ; Dan Carpenter ; Karsten > Keil ; Jassi Brar ; Tom > Lendacky ; David S. Miller > ; Jose Abreu ; Kalle > Valo ; Stanislaw Gruszka ; > Benson Leung ; Enric Balletbo i Serra > ; James E.J. Bottomley > ; Martin K. Petersen ; > Greg Kroah-Hartman ; Alexander Viro > ; Petr Mladek ; Sergey > Senozhatsky ; Steven Rostedt > ; David Laight ; Andrew > Morton ; Intel Graphics Development gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; DRI Development devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>; Linux Kernel Mailing List kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; netdev ; > ath10k-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org; linux-wireless = ; > scsi ; Linux Fbdev development list = fbdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>; driverdevel ; = Linux > FS Devel > Subject: Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines = of > repeated bytes >=20 > Hi Alastair, >=20 > Thanks for your patch! And thanks for your politeness :) >=20 > On Wed, May 8, 2019 at 9:04 AM Alastair D'Silva > wrote: > > From: Alastair D'Silva > > > > 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, >=20 > 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. > > which are replaced with '** Skipped %u bytes of value 0x%x **' >=20 > 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. --=20 Alastair D'Silva mob: 0423 762 819 skype: alastair_dsilva msn: alastair-fCx97xH5QTlAfugRpC6u6w@public.gmane.org blog: http://alastair.d-silva.org Twitter: @EvilDeece