Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4704653yba; Wed, 10 Apr 2019 03:11:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqywyJj3PPSK+ZDOnvbbZ4+gleriYwTQf4NEkWN0iUzpAhDEfQ9cfvwLBgL47gYKz0+rIqdx X-Received: by 2002:a17:902:2f84:: with SMTP id t4mr21794138plb.6.1554891097622; Wed, 10 Apr 2019 03:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554891097; cv=none; d=google.com; s=arc-20160816; b=cIU8+eGa5LX5UGfMenS4cm7mOHyLzqAjYTq55H2+01fVdXMVj/dQylhMgfJCSBj7bl yEwD9nMr/OW1d0tT+BGUVmcj5hkT2cavasPd6NyUeCywc0TTN8orHWVfOwt1cO9VMLJ4 b1zC4cTPDvaZhXFQ+mpn7MpmS7+w6wO1ynZa0cAPIEST3zi8iRg7bvixGE7FyjHz2eBU mx4umqLR+3KMo5lGqwPai2yR3OHmnHp5eEuNr3+wXBpNSSKJX58b75UEbTwQzWrns437 OOzqHFPjfpsZ8tixeI2HTUYSTgtQWKELt7+mfwOXnjeoNQHrYqPAtvoGvVByOR+ry6Gd 72ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dkim-signature; bh=JtyEKJZq/sCyifdiet92WKcbrGyx9XGF+d0HjejmNPE=; b=psJObCdlFSpItRo8fETiJyBPl9EF+sGP5Je8BXN1Mpyrb0KSNETpCHyqNwJ5W7h7L4 4Ks2x/4yEuA1LtL3eug99FBHpxVbB6Ht9y7non2jVdiK75+eZGdt6Nhr4ALsZ9KKqtae Hp+mfeKvTXIBGjdsOejDgmx06pK0D2IMjknAAvUVixzNp6vIK5FpxMZibm2opI5sswT/ Ik948OMMyDxEUA9/Yuab9uZU4lVp9dhe0asAZOWXTpsIqKrf0DUzlN9P53VPENpEHg7J k6jl5hjfZ46qocs8q/jd0sqkzalm4lNdnCSVyHrgR9qeWbwTBdn9WCl99va4d4W+ygYD rRcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@d-silva.org header.s=201810a header.b=Tbvv2b8u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 d4si22614148plr.301.2019.04.10.03.11.21; Wed, 10 Apr 2019 03:11:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@d-silva.org header.s=201810a header.b=Tbvv2b8u; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730067AbfDJJxY (ORCPT + 99 others); Wed, 10 Apr 2019 05:53:24 -0400 Received: from ushosting.nmnhosting.com ([167.160.173.127]:44470 "EHLO ushosting.nmnhosting.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729273AbfDJJxX (ORCPT ); Wed, 10 Apr 2019 05:53:23 -0400 Received: from mail2.nmnhosting.com (unknown [202.169.106.97]) by ushosting.nmnhosting.com (Postfix) with ESMTPS id BA1FF2F28FBB; Wed, 10 Apr 2019 05:53:17 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=d-silva.org; s=201810a; t=1554889998; bh=HpSR4lU2fda1pmePQlDBV7zLl/nIo9BrQvOkc9aRnWQ=; h=From:To:Cc:References:In-Reply-To:Subject:Date:From; b=Tbvv2b8u9cg1pCHqI1CX7UizfhZiKPJTiQMQ0AUA1F3aa7YUWQiLGo6VoyBYVznqP DFupL4pxymYD2M0wwe6SvE+dQ6V+B7MHLptm0oD8R4GqAHQ4eRZcTH0eZQKgAX3fpt zqbvZOp6iVQZAqrPV3YZIHGZZYdyEAaUPofNJqyVrAZ1Cg1mgppDnCj7hzJ7Op5PvB /9W75atdmUo45Z/+Ft1fIpa8ws37RpK7FgmBgtFAAJyLfw2UP9JRCReE3g1DtDiE52 rXdd/MBBdcpcvcyqb8IT/pkZ/gYbKS207/rMQnL9jwxQx/48U7golJBxN4h0SbGpVl cTUI9Z7yUdKG6d3kgm2KIiEwYT4qru08YYAqfgGD9fVcX+wcYn+uNLsK8uLASNLjvV ZnP/BMZXnhUcf9mtZL+HXCAvZUDqjeE8eK+XVB+J+5VQSnME03DNx0tdTu66Zgm4k/ y5/XNJkP1TCWynxqCWWUWik3ntSpLhGakIUEzbzPymTLwv1//xMFZldX/Dn+GQz2Vs dDnj1CaVFVoIVXIk8NufEFaeqOHFcBiwoDAzU/u9z5czQLeXOPKV3QKgOvzCXptAf4 smQB5UkrW2KjUffkI2YcMUgoOWbSWNybMUzKnJvjDfZEyDlvTU3X60zfrq9xM4mc0/ nn4hTMgkVyJJQfN6Nr43knvE= Received: from Hawking (ntp.lan [10.0.1.1]) (authenticated bits=0) by mail2.nmnhosting.com (8.15.2/8.15.2) with ESMTPSA id x3A9r0EN096809 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Apr 2019 19:53:01 +1000 (AEST) (envelope-from alastair@d-silva.org) From: "Alastair D'Silva" To: "'David Laight'" , "'Alastair D'Silva'" Cc: "'Jani Nikula'" , "'Joonas Lahtinen'" , "'Rodrigo Vivi'" , "'David Airlie'" , "'Daniel Vetter'" , "'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'" , "'Andrew Morton'" , , , , , , , , , , References: <20190410031720.11067-1-alastair@au1.ibm.com> <20190410031720.11067-5-alastair@au1.ibm.com> <1cd09186c67b4fa4bceb84faf835ff10@AcuMS.aculab.com> In-Reply-To: <1cd09186c67b4fa4bceb84faf835ff10@AcuMS.aculab.com> Subject: RE: [PATCH 4/4] lib/hexdump.c: Allow multiple groups to be separated by lines '|' Date: Wed, 10 Apr 2019 19:52:58 +1000 Message-ID: <051301d4ef83$34d2c710$9e785530$@d-silva.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQMagew30YCVD5mEhyHx4HPts9xr1AGYm3aUAX9F7fqjkUMc8A== Content-Language: en-au X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (mail2.nmnhosting.com [10.0.1.20]); Wed, 10 Apr 2019 19:53:12 +1000 (AEST) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: David Laight > Sent: Wednesday, 10 April 2019 6:45 PM > To: 'Alastair D'Silva' ; alastair@d-silva.org > Cc: Jani Nikula ; Joonas Lahtinen > ; Rodrigo Vivi = ; > David Airlie ; Daniel Vetter ; = 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 > ; Andrew Morton ; > intel-gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; = linux- > kernel@vger.kernel.org; netdev@vger.kernel.org; > ath10k@lists.infradead.org; linux-wireless@vger.kernel.org; linux- > scsi@vger.kernel.org; linux-fbdev@vger.kernel.org; > devel@driverdev.osuosl.org; linux-fsdevel@vger.kernel.org > Subject: RE: [PATCH 4/4] lib/hexdump.c: Allow multiple groups to be > separated by lines '|' >=20 > From: Alastair D'Silva > > Sent: 10 April 2019 04:17 > > With the wider display format, it can become hard to identify how = many > > bytes into the line you are looking at. > > > > The patch adds new flags to hex_dump_to_buffer() and > print_hex_dump() > > to print vertical lines to separate every N groups of bytes. > > > > eg. > > buf:00000000: 454d414e 43415053|4e495f45 00584544 > NAMESPAC|E_INDEX. > > buf:00000010: 00000000 00000002|00000000 00000000 ........|........ >=20 > Ugg, that is just horrid. > It is enough to add an extra space if you really need the columns to = be more > easily counted. > I did consider that, but it would be a more invasive change, as the = buffer length required would differ based on the flags. =20 > I'm not even sure that is needed if you are printing 32bit words. > OTOH 32bit words makes 64bit values really stupid on LE systems. > Bytes with extra spaces every 4 bytes is the format I prefer even for = long > lines. >=20 > Oh, and if you are using hexdump() a lot you want a version that never = uses > snprintf(). >=20 > David >=20 > - > Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, > MK1 1PT, UK Registration No: 1397386 (Wales) >=20 >=20 > --- > This email has been checked for viruses by AVG. > https://www.avg.com