Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2976746rwb; Sat, 24 Sep 2022 20:16:46 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4T0b+oQfVmaxieWRkmSB5DBLdY5Eutdcm67N7OzFxSgaZm3ldsrIpxir7DuPZteQbeR2/H X-Received: by 2002:a05:6402:410:b0:451:ea13:4ed7 with SMTP id q16-20020a056402041000b00451ea134ed7mr16865720edv.262.1664075806459; Sat, 24 Sep 2022 20:16:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664075806; cv=none; d=google.com; s=arc-20160816; b=gyP3bZRHFYt3XL3Sp85yTCSPqjSL4IFxbxEWJ972oDzmaZXDNP3LzhsTTcqxwoBbOq q4kmxo455ArAxWoZCMwgSD5EPJv20j3EKF0DkKigBdr04v9LqlC4J8aQHppGGI8600+k YPpdkrWuBb3R6hH3uPIXrhQ/+GVTYSRQz8cixyQGLzO0AFzB/RCys+XXhPi6EkOvsi7b NzKM0Wlb7sXw+4ksIVwUkxRNlgr5NN7ib6lvtT4IyNeJa7zXzp9Qtl0K9N/1xC2Iv6eB qp0BK9Np0Z8lCoYlG19FaCW4JqmPtBYsXKs/9eHExw2ttN7eDfY3bJha76oo3cNy0/Cj LSiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=OS4UYZ8DIUkJDvQP5tRmIq0ewNPcm5dr1beINkDXglI=; b=UICdHRkZ5Q4Cauep67303YZ44t3liQpw6xwVqrgoEq91EDjiJzIT07xdXlNQGpD2vj MHw3P5AUd+kS8+SiOP19iELBdlfBHMS4kvlruksTlCt4xTOxw0C/JKhfpp7/nLEeVLXc zZui1tttjsL4KNVBAg6ulUQRd/VcNrEkPLR9QJAJPpAHgnqb8dUZPrVv6AkzMWrWTPIf XnKYAkOjqN+4QQWerbxRVJMLEYhB51g+r/ptm4Lo6igTJOeo1rEHTrB9t30ge+VogcBY vDj8o8mksRleYSDyweFAgXfnJcI9Z2bq+qcPum7j96H+QwD7l/+LzEHx2G3I/xfk20bx /nHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pMsNwRcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qw10-20020a1709066a0a00b0073dda1430b9si6790578ejc.403.2022.09.24.20.16.14; Sat, 24 Sep 2022 20:16:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pMsNwRcT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbiIYC7S (ORCPT + 99 others); Sat, 24 Sep 2022 22:59:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbiIYC7M (ORCPT ); Sat, 24 Sep 2022 22:59:12 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D097243639 for ; Sat, 24 Sep 2022 19:59:11 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id p14so826864pjd.3 for ; Sat, 24 Sep 2022 19:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=OS4UYZ8DIUkJDvQP5tRmIq0ewNPcm5dr1beINkDXglI=; b=pMsNwRcTsrUwx4709l7bBQopVh9p8cTyUX4+N6zn0nGWfJ8aUJeAL6mO0gTX6Fasms v6I78Uu9UXJKgF9koM9Gqx2WiZ9DClMxdqnvUt/Qo2o2CF6QPdvNcnnS1J68fBRHlbAw 1ELy3Qr8uuE/wKvYsVvHYLnEmfvYXtu//PF3eBf37gXTqz9SdeNH0Qt8Rf5LoVmeECOG E1eJmnL8Ko/RY4KPHkoIGJVVSUbb0CHJ0Zk0ZMs01k4+9bKxesewUk4QsDCjk40Ih3q9 W5daZ9pOk/mE+CjCMPmT+2PpcxG/n3BcT6VvlGFxksLSc3bYw/U2+ptcBKiw1MCgLIbM PP5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date; bh=OS4UYZ8DIUkJDvQP5tRmIq0ewNPcm5dr1beINkDXglI=; b=QqmVeAZVD+sd40fSYpyN9GvH5Wf3g4QAgrcLh78D7RUZUyFqY6+DgEWhxMbMuNBFJ8 lnSGXjtqPZ8l4pFN3Cf9B1dbB4BN+pm4lM17eNj8Eg8qVe51H8y8JC4bmveyyacq39Aa Zi9/KCXrTmCXNxfl/7nyrbDYLbq/LsPJdqwRJAvybkchjyMQn7EcQiO9H7dKnT9irmEZ p2iTLIiWnCzlkSfVC296NAFljHtZxzcaxmuOWyG/VXTQxPQ/aMiMgIchHD5HjVbPCsO5 5vT2XbaPgharl8MIKFPVDajITULjazptEfSQGj9CWwTsYGixCh70j/1sFImMwv9F08Vo L97g== X-Gm-Message-State: ACrzQf1XjMHFGwgyue574FGl4Qs7BSb+tDaa/jpgHnj3hhToxokv+0RC R0xc0Ndv6mzBRcXSzYdtjMfHZg== X-Received: by 2002:a17:90a:1b6e:b0:1f5:1902:af92 with SMTP id q101-20020a17090a1b6e00b001f51902af92mr29852232pjq.238.1664074751300; Sat, 24 Sep 2022 19:59:11 -0700 (PDT) Received: from leoy-huanghe.lan ([137.184.34.254]) by smtp.gmail.com with ESMTPSA id z11-20020a170903018b00b0016bf5557690sm8409198plg.4.2022.09.24.19.59.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Sep 2022 19:59:10 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Jiri Olsa , Namhyung Kim , Ian Rogers , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Cc: Leo Yan Subject: [PATCH v3 1/2] perf subcmd: Set environment variable "PREFIX" Date: Sun, 25 Sep 2022 10:58:34 +0800 Message-Id: <20220925025835.70364-2-leo.yan@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220925025835.70364-1-leo.yan@linaro.org> References: <20220925025835.70364-1-leo.yan@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Set environment variable "PREFIX", it will be used by invoked shell script, e.g. the shell script uses it to find lib paths. Signed-off-by: Leo Yan --- tools/lib/subcmd/exec-cmd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/lib/subcmd/exec-cmd.c b/tools/lib/subcmd/exec-cmd.c index 33e94fb83986..5dbea456973e 100644 --- a/tools/lib/subcmd/exec-cmd.c +++ b/tools/lib/subcmd/exec-cmd.c @@ -24,6 +24,9 @@ void exec_cmd_init(const char *exec_name, const char *prefix, subcmd_config.prefix = prefix; subcmd_config.exec_path = exec_path; subcmd_config.exec_path_env = exec_path_env; + + /* Setup environment variable for invoked shell script. */ + setenv("PREFIX", prefix, 1); } #define is_dir_sep(c) ((c) == '/') -- 2.34.1