From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932575AbcISVHf (ORCPT ); Mon, 19 Sep 2016 17:07:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60986 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932225AbcISVHe (ORCPT ); Mon, 19 Sep 2016 17:07:34 -0400 Date: Mon, 19 Sep 2016 16:07:32 -0500 From: Josh Poimboeuf To: Linus Torvalds Cc: Rabin Vincent , Peter Zijlstra , Stephane Eranian , Vince Weaver , LKML , Alexander Shishkin , Ingo Molnar , Kees Cook , Vegard Nossum Subject: Re: [PATCH v3] scripts: add script for translating stack dump function Message-ID: <20160919210732.youtya5lgfd44dkb@treble> References: <20160917004212.tsr3taygbcidvgl5@treble> <20160919155214.ap2cgwjkjn2s7itr@treble> <20160919200055.GA17411@lnxartpec.se.axis.com> <20160919205640.fu7gjng2zkpmansu@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0.1 (2016-04-01) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 19 Sep 2016 21:07:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 19, 2016 at 02:02:18PM -0700, Linus Torvalds wrote: > On Mon, Sep 19, 2016 at 1:56 PM, Josh Poimboeuf wrote: > > On Mon, Sep 19, 2016 at 01:24:03PM -0700, Linus Torvalds wrote: > >> > >> because I certainly hope there is always a space there. > > > > No luck. The Japanese translation uses an empty string: > > Heh. > > Ok, we don't want to *just* have the "./" pattern ever be replaced, > because for all I know there could be a directory name ending with "." > in there somewhere. > > But I guess we could do it this way instead: > > --- a/scripts/faddr2line > +++ b/scripts/faddr2line > @@ -79,7 +79,7 @@ find_dir_prefix() { > return > fi > > - DIR_PREFIX=$prefix > + DIR_PREFIX="$prefix\(\./\)*" > return 0 > } > > and thus just make it part of the auto-generated pattern string instead. Actually, false alarm. The empty translation string seems to mean "use the original string": $ export LANG=ja_JP.utf8 $ ./scripts/faddr2line ~/k/vmlinux type_show+0x10/45 type_show+0x10/0x2d: type_show at drivers/video/backlight/backlight.c:213 So your previous patch which checks for a space looks good after all :-) -- Josh