Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4839353yba; Mon, 13 May 2019 00:05:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwc8PB9jHb9dRud2WsbUqWRbBbzNV6HN3NHyTQUqQ15267xvGJSKXVgSzKucWPNFzqOzcfw X-Received: by 2002:a17:902:be15:: with SMTP id r21mr29132237pls.340.1557731123247; Mon, 13 May 2019 00:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557731123; cv=none; d=google.com; s=arc-20160816; b=BlRe3sh12n1GrLvWajEu6C8oYCBcJvHQJmpHeTNnnka7iMM5deKEzNV3hNCF3WgKus OlW6aFQF61vmQ6Ns18mmJYd1g9SOFdl/V/f+yKbv63BUW2RKnxpiiH6wZuxiYEOcq1R8 u5i08RYuiz6RVMtOn8fPibGxf3nkMaNJJ+j5QNCh72jOqCukr/lvfzUNuT+oF4rnd/rn hbZKCoaN40lyrB19hfVNATYrl/BuCm5ayABwsstRH2Of8EmZQGhb6EIMEoEVjmhgzkZa +sKoE33hmj6aLYo/bedgqUGpsDqyMWDIQLR+Hj2Bgd89+x5qDejxt0ezUdWY9EJVvUMD UvxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=KZeUlM9HFwsoPba3BedCeGi13MK+EsvDzCuCOHnSeSU=; b=rc5rzppxoFokk8DDu8nKchdIvPNYm6wFgPj9KIw52R9nKval0qHEVsiZFuYCO7Ls3w dMWmIO2WbD3uJV8cJVn0RhwAOUjIGVClzBzRQB6JdpZa4WwpkN7Zk+395sftSKkJUoA8 s0f5hYGO2XqgCU3FYIh3SZE6GW72h6rQSop0amdq7R9K9XCsUHoNsl2Sq0+oEJMWBJR7 R/mXBA9Zy/YvuS5bj0XBgoUBFYdp8sKMIAUsCGS9qOMJbPqsYHF3+0BF+25iimzfJA25 M9+jRx4XmzyOQ5CIM6Yl34TJSYefKGA875A6ScNO6ZLED7Aqu66MKVPX3/ytC6DBhbpf 8W3A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7si14498933pgw.133.2019.05.13.00.05.08; Mon, 13 May 2019 00:05:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727671AbfEMHB2 (ORCPT + 99 others); Mon, 13 May 2019 03:01:28 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:39924 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725980AbfEMHB2 (ORCPT ); Mon, 13 May 2019 03:01:28 -0400 Received: by mail-vs1-f67.google.com with SMTP id m1so184649vsr.6; Mon, 13 May 2019 00:01:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KZeUlM9HFwsoPba3BedCeGi13MK+EsvDzCuCOHnSeSU=; b=tglJ4xUOY7AZqgm0J8qMlTgm8HcXbatXI4c0qw4kxx2eIKQaxlfamPWrr06J46KUnC qbOK5/l66Y4TcNMDhVeOHjm/Wb0cQwFSLnKm7F4iARBf4Bppwx4RZm6cCtIlSa34TReW kVIuxnm3ez2Xa/nOtwRbm4IyBdFLCDn9NMl7iT5cDE0vRwKR17KTeaHQSop/azJh+kpa hJ2OwH3DEy01tDeqMRKI6DqnWwFObs1DqMpnaU/5SUkUjjf3P5WeNCaSA/6mlh9IHVT2 uS9KpxvpuV5TcbVJSiiawVoOVDTztxxNg9gJZUPFJKPMSu+SwW3FSaAyWaibGXrgMXxs dgpA== X-Gm-Message-State: APjAAAXw3ro/WseG2ulbzPbD6Ov146oenYie8FJUch304PR/260M9twJ Mw1YLLu6yPRLU/0021rH+LzC4Yy1cgcwT8jtA48= X-Received: by 2002:a67:770f:: with SMTP id s15mr4419527vsc.11.1557730886319; Mon, 13 May 2019 00:01:26 -0700 (PDT) MIME-Version: 1.0 References: <20190508070148.23130-1-alastair@au1.ibm.com> <20190508070148.23130-4-alastair@au1.ibm.com> In-Reply-To: <20190508070148.23130-4-alastair@au1.ibm.com> From: Geert Uytterhoeven Date: Mon, 13 May 2019 09:01:14 +0200 Message-ID: Subject: Re: [PATCH v2 3/7] lib/hexdump.c: Optionally suppress lines of repeated bytes To: "Alastair D'Silva" Cc: alastair@d-silva.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 , DRI Development , Linux Kernel Mailing List , netdev , ath10k@lists.infradead.org, linux-wireless , scsi , Linux Fbdev development list , driverdevel , Linux FS Devel Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi Alastair, Thanks for your patch! 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, 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? > 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 ;-) $ cat $(type -p unhexdump) #!/bin/sh sed 's/^[0-9a-f]*//' $1 | xxd -r -p | dd conv=swab Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds