From: tip-bot for Avik Sil <avik.sil@linaro.org>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
hpa@zytor.com, mingo@kernel.org, a.p.zijlstra@chello.nl,
avik.sil@linaro.org, tglx@linutronix.de
Subject: [tip:perf/urgent] perf tools: Fix pager on minimal-install embedded systems
Date: Wed, 6 Jun 2012 00:00:03 -0700 [thread overview]
Message-ID: <tip-ea1b3ebac9a1c72c4362c784b4ed069a938a4ddb@git.kernel.org> (raw)
In-Reply-To: <1338287725-26382-1-git-send-email-avik.sil@linaro.org>
Commit-ID: ea1b3ebac9a1c72c4362c784b4ed069a938a4ddb
Gitweb: http://git.kernel.org/tip/ea1b3ebac9a1c72c4362c784b4ed069a938a4ddb
Author: Avik Sil <avik.sil@linaro.org>
AuthorDate: Tue, 29 May 2012 16:05:25 +0530
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 30 May 2012 15:10:39 -0300
perf tools: Fix pager on minimal-install embedded systems
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>
Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1338287725-26382-1-git-send-email-avik.sil@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
| 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
--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";
+ }
if (!pager)
pager = "less";
else if (!*pager || !strcmp(pager, "cat"))
prev parent reply other threads:[~2012-06-06 7:00 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
2012-06-06 7:00 ` tip-bot for Avik Sil [this message]
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=tip-ea1b3ebac9a1c72c4362c784b4ed069a938a4ddb@git.kernel.org \
--to=avik.sil@linaro.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome