From: Avik Sil <avik.sil@linaro.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Perf: Use /usr/bin/pager if available for perf pager
Date: Tue, 29 May 2012 16:40:30 +0530 [thread overview]
Message-ID: <4FC4AEA6.2090209@linaro.org> (raw)
In-Reply-To: <20120529114506.7c8d6157@pyramind.ukuu.org.uk>
Hi Alan,
On Tuesday 29 May 2012 04:15 PM, Alan Cox wrote:
> On Tue, 29 May 2012 16:05:25 +0530
> Avik Sil<avik.sil@linaro.org> wrote:
>
>> Some Distributions may lack "less" package being included by default, e.g., Linaro nano rootfs. In those cases use the portable "pager" command instead of "less".
>>
>> Signed-off-by: Avik Sil<avik.sil@linaro.org>
>> ---
>> tools/perf/util/pager.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c
>> index 1915de2..3322b84 100644
>> --- a/tools/perf/util/pager.c
>> +++ b/tools/perf/util/pager.c
>> @@ -57,6 +57,10 @@ void setup_pager(void)
>> }
>> if (!pager)
>> pager = getenv("PAGER");
>> + if (!pager) {
>> + if (!access("/usr/bin/pager", X_OK))
>> + pager = "/usr/bin/pager";
>> + }
>
> What is "portable" about /usr/bin/pager ? and what is wrong with just
> doing
>
> export PAGER=/usr/bin/pager
>
This patch basically avoids explicitly setting PAGER=/usr/bin/pager
before running say 'perf list' on the system where less is not installed.
Regards,
Avik
next prev parent reply other threads:[~2012-05-29 11:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-29 10:35 [PATCH] Perf: Use /usr/bin/pager if available for perf pager Avik Sil
2012-05-29 10:45 ` Alan Cox
2012-05-29 11:10 ` Avik Sil [this message]
2012-06-06 7:00 ` [tip:perf/urgent] perf tools: Fix pager on minimal-install embedded systems tip-bot for Avik Sil
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FC4AEA6.2090209@linaro.org \
--to=avik.sil@linaro.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox