Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp637876rdb; Thu, 30 Nov 2023 14:12:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IFEzEa+ZszsjYxSXA1Lo87l+kY6cXOKaShTbHQn/xuVv/Ji4vz5/bsAlI98j830bVfZW+CB X-Received: by 2002:a05:6a20:e11a:b0:181:15:5755 with SMTP id kr26-20020a056a20e11a00b0018100155755mr30822228pzb.56.1701382351837; Thu, 30 Nov 2023 14:12:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701382351; cv=none; d=google.com; s=arc-20160816; b=qlgCRd/5HJxnCI1J+vwuDFklP6rksko+h4oXNoym7ov5gknZkCcFTCXygG1voANpQy 0uhw8LxEIdANsncMx7hpFjPjicyrNEgmFTbZ1wjeXEVTFDbQssEZeig1pjH69it1G79w xbqSaCoe3Q5YQNBKK9ap0JMyD4Xa/HYtegvUnfyk/mPshcC22e9vaGJ7uVsV/PNFbcN3 6WzCi47/mGUc0djB13FypIkb0386Js7X6NXnTipp//EQyzcZikKd+CAg63W8dFM8Lz3M PsaY5rtI38018Cjb6Eolk8dIAlVpUMBvVN6HEr7xvDJJecNSTfD0AWQTbrjFnazZIjYG 4aBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=qm1SJf2Ijq2uL3uOQKknBVHGA5aH/E3OiPgdqiXfvMM=; fh=sHhPd5XNm2Ch2P/ADKQMS7Hro3wrpQNlWyBhMrX/C2I=; b=B60WNqMX/Nk28RHIBMWdvX2B+lG3kN4E4C5ayTr8BI57ZVMkHiWChcOZ0mO+yhMJyv L0E92xW0SloPZhHGhJV1GL0PH/JneY2sx/Rw5F129A0ptmBYjlvza4VRuh+4634srDNO iPNbiCGd+cFFI7BYGJGbw4AlVbN7JrZ6TeFrbSMFq30dBRJSDSdNkukSx9ti4n5t/V83 wc6p8GYXtp+EDPiX6ihBbX88Qb3jxqjXRKChUhPtYV9XZuKlhLaGUAtRLindRtv57N3/ bJxaGiyPs7oW783bZYtRjDv7hHngx8s8mSTrVWS2cx7nZbm/5+9XidaNiXkJQEIO1aKi 9XnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id bf20-20020a17090b0b1400b0028648abac04si1258368pjb.58.2023.11.30.14.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 14:12:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 40FF6802177D; Thu, 30 Nov 2023 14:12:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377120AbjK3WMP convert rfc822-to-8bit (ORCPT + 99 others); Thu, 30 Nov 2023 17:12:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229804AbjK3WMO (ORCPT ); Thu, 30 Nov 2023 17:12:14 -0500 Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B892B10DF; Thu, 30 Nov 2023 14:12:20 -0800 (PST) Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-5c21e185df5so1162233a12.1; Thu, 30 Nov 2023 14:12:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701382340; x=1701987140; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+Z2BEAePLu01GRPlfECCRaK8cq/hBNpwuCocumn+ug4=; b=VjrD9LBGRx0AT73T4mgniuqfUKmBSH4mqWGmUblO+7mXJJ6OX1F/dLSo7++qotgAau KFoDVwPNDkVPPLiFqdPKcaF21ZPgK+zJDmL0LnvKOPEnbHicz2+/g8WKokZ3Tg+GLPz+ 9KJ0WJIAJb8MG8eWdi1tXu/iKHh9JyxVDKm4X7bZkKC/GCj4LZgBWZui5TGBzZoZo4Am E+GbwgvqcPZfhD1Q5F1FwksbVueQyEj6aGpESI81BQ6LTWb1/bnyBLlThwgW2zePfwat jiRr4uuitRSu3KWpmDoZw4K/fchPWBVrxNyKsgbKKC9C95JmqFHbgInicRqrbzfbYq48 4NlA== X-Gm-Message-State: AOJu0Yy7Q0mU1NhRmxBZCcKdCKAAQR3+tipeT9eQeUk8HKU0uFoStifZ EzQ93GKJKP2g+rwlb0BtAf4avqiSxxutbjqaFFY= X-Received: by 2002:a17:90a:f3cc:b0:280:25e8:f7b4 with SMTP id ha12-20020a17090af3cc00b0028025e8f7b4mr24694263pjb.15.1701382340064; Thu, 30 Nov 2023 14:12:20 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Namhyung Kim Date: Thu, 30 Nov 2023 14:12:08 -0800 Message-ID: Subject: Re: [PATCH 1/1] perf beauty: Don't use 'find ... -printf' as it isn't available in busybox To: Arnaldo Carvalho de Melo Cc: Ian Rogers , Adrian Hunter , Jiri Olsa , linux-perf-users@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Thu, 30 Nov 2023 14:12:29 -0800 (PST) Hi Arnaldo, On Thu, Nov 30, 2023 at 1:54 PM Arnaldo Carvalho de Melo wrote: > > Namhyung reported: > > I'm seeing a build error on my Alpine linux image which uses busybox + > musl libc: > > In file included from trace/beauty/arch_errno_names.c:1, > from builtin-trace.c:899: > /build/trace/beauty/generated/arch_errno_name_array.c: In function 'arch_syscalls__strerrno': > /build/trace/beauty/generated/arch_errno_name_array.c:142:49: error: unused parameter 'arch' [-Werror=unused-parameter] > 142 | const char *arch_syscalls__strerrno(const char *arch, int err) > > It looks like busybox find command doesn't have -printf option > > find: unrecognized: -printf > , Yesterday 9:16 PM > , > BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary. > > Usage: find [-HL] [PATH]... [OPTIONS] [ACTIONS] > > Search for files and perform actions on them. > First failed action stops processing of current file. > Defaults: PATH is current directory, action is '-print' > > So just remove it and pipe find's entry to a basename loop to produce > the same result. > > Fixes: 0337cf74ccf2a434 ("perf util: Introduce architecture specific errno/name mapping") > Reported-by: Namhyung Kim > Cc: Adrian Hunter > Cc: Hendrik Brueckner > Cc: Ian Rogers > Cc: Jiri Olsa > Cc: Michael Petlan > Cc: Thomas Richter > Signed-off-by: Arnaldo Carvalho de Melo Thanks for the fix! Tested-by: Namhyung Kim Thanks, Namhyung > --- > tools/perf/trace/beauty/arch_errno_names.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/trace/beauty/arch_errno_names.sh b/tools/perf/trace/beauty/arch_errno_names.sh > index cc09dcaa891e04bb..3ec8781344db13ba 100755 > --- a/tools/perf/trace/beauty/arch_errno_names.sh > +++ b/tools/perf/trace/beauty/arch_errno_names.sh > @@ -76,7 +76,7 @@ EoHEADER > > # Create list of architectures that have a specific errno.h. > archlist="" > -for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sort -r); do > +for arch in $(find $toolsdir/arch -maxdepth 1 -mindepth 1 -type d | while read arch ; do basename $arch ; done | sort -r); do > test -f $toolsdir/arch/$arch/include/uapi/asm/errno.h && archlist="$archlist $arch" > done > > -- > 2.41.0 >