From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752714AbdLSPFX (ORCPT ); Tue, 19 Dec 2017 10:05:23 -0500 Received: from mga03.intel.com ([134.134.136.65]:21799 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752477AbdLSPFW (ORCPT ); Tue, 19 Dec 2017 10:05:22 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,427,1508828400"; d="scan'208";a="3078419" Message-ID: <1513695919.7000.198.camel@linux.intel.com> Subject: Re: [PATCH v1] scripts/decodecode: Make it take multiline Code line From: Andy Shevchenko To: Andrew Morton Cc: Will Deacon , Dave Martin , Philippe Ombredanne , linux-kernel@vger.kernel.org Date: Tue, 19 Dec 2017 17:05:19 +0200 In-Reply-To: <20171212125105.2ad43a65f42a63cc6e4f4bcb@linux-foundation.org> References: <20171212100323.33201-1-andriy.shevchenko@linux.intel.com> <20171212125105.2ad43a65f42a63cc6e4f4bcb@linux-foundation.org> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2017-12-12 at 12:51 -0800, Andrew Morton wrote: > On Tue, 12 Dec 2017 12:03:23 +0200 Andy Shevchenko linux.intel.com> wrote: > > > In case of running scripts/decodecode without any parameters in > > order to give a > > copy'n'pasted Code line from, for example, email it would parse only > > first line > > of it, while in emails it's split to few. > > > > So, add a logic to join this split back if and only if the following > > lines have > > hex digits, or spaces, or '<', or '>' characters. It will be quite > > unlikely to > > have a broken input in well formed Oops or dmesg, thus a simple > > regex is being > > used. > > That's rather hard to understand. An example would help? When you have a file out of oops the Code line looks like Code: hh hh ... ... hh\n When copy'n'paste from, for example, email where sender or some middle MTA split it, the line looks like: Code: hh hh ... hh\n hh ... ... hh\n hh hh ... hh\n The Code line followed by another oops line usually contains characters out of hex digit + space + < + > set. That's what second paragraph describes. Should I resend with information above included? -- Andy Shevchenko Intel Finland Oy