Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4681967yba; Wed, 10 Apr 2019 02:40:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxJO/kEmOwqs4VoOARzNS0vdivTlELlV1G1CaTVKWLgoguRTU+TAih+bhIGSKeI0qz6JXf/ X-Received: by 2002:aa7:8392:: with SMTP id u18mr16084730pfm.217.1554889218458; Wed, 10 Apr 2019 02:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554889218; cv=none; d=google.com; s=arc-20160816; b=P1Qey/tMaclm7GYTE8mKkIHZqm5IpTKXfqo1MOk1ELXuJ6iK2JaXTuJnp9Ru9UTHzv mFgSqYmLIDlekh4CScvijUZP8EnVFBV1xxlO1ANpEW6/2JCOKTOXMnkCPd1dWeU6q5Ix DrUGLQ1/leBsDMeht0nAPPmmx7hP86O8eT2HtLwnqRrWtOm3J33UbCrOsa1aYAxJzcl+ TdUvWVdkdUIngq5a6/gK73jG8ZjzADHQuv2Wcv3OgR2XsMJyvYUkH4E7Vh6ViNKtxtEd /kGg48d7ffwNj2mMvaidUklQxq51hg7pSqYHuJhlxbvD3hxvx26em8/4FY+O7oFygHyY LWTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=nIwyzt/9PD4osgufMbi7K2G171YuRE27SjXlWs0zwS8=; b=RHOcKw7uJ6/qaJ66j4XrCTejx5OvKy69o3rfCvPZwZv5I7Tm4rPMRDUDOK4OBLCLRd Rtw0ywGwACyMlhSU0uuZ8u63MZBMjHGN9d2JFwMFTIyvSRi50adbRaTJGXp6EhDAudfw Xe3XMHkcLKoQEEadyWFG//EyjAnzulS2G3h6EvOz0AWD43n6wo2sMU/TzMNGoqdi5X5m 9JinaFjwWFz6PIaseLKONxxOyieAAp2t34l7enWA/Nyf0PdwHEMqJaZrc802aefGD9Tb 80BRfSCY/cBUJZ9NIYA0PASsMNxmsqdWtu6XZg/LdzCY3pnpEOhXVCQEVXO9v0+yb/Ay ZJBQ== ARC-Authentication-Results: i=1; mx.google.com; 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 j25si19144975pga.22.2019.04.10.02.39.59; Wed, 10 Apr 2019 02:40:18 -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; 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 S1728965AbfDJIoW convert rfc822-to-8bit (ORCPT + 99 others); Wed, 10 Apr 2019 04:44:22 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([146.101.78.151]:27138 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728828AbfDJIoV (ORCPT ); Wed, 10 Apr 2019 04:44:21 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-139-fjmoDOY7OryNuGiZcxGCOA-1; Wed, 10 Apr 2019 09:44:16 +0100 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b::d117) by AcuMS.aculab.com (fd9f:af1c:a25b::d117) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Wed, 10 Apr 2019 09:45:25 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Wed, 10 Apr 2019 09:45:25 +0100 From: David Laight 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 '|' Thread-Topic: [PATCH 4/4] lib/hexdump.c: Allow multiple groups to be separated by lines '|' Thread-Index: AQHU70w0rkaVHIS5K0aGNoZBJJ6fAqY1Ew8A Date: Wed, 10 Apr 2019 08:45:25 +0000 Message-ID: <1cd09186c67b4fa4bceb84faf835ff10@AcuMS.aculab.com> References: <20190410031720.11067-1-alastair@au1.ibm.com> <20190410031720.11067-5-alastair@au1.ibm.com> In-Reply-To: <20190410031720.11067-5-alastair@au1.ibm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-MC-Unique: fjmoDOY7OryNuGiZcxGCOA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ........|........ 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'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. Oh, and if you are using hexdump() a lot you want a version that never uses snprintf(). David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)