All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Perf: Use /usr/bin/pager if available for perf pager
@ 2012-05-29 10:35 Avik Sil
  2012-05-29 10:45 ` Alan Cox
  2012-06-06  7:00 ` [tip:perf/urgent] perf tools: Fix pager on minimal-install embedded systems tip-bot for Avik Sil
  0 siblings, 2 replies; 4+ messages in thread
From: Avik Sil @ 2012-05-29 10:35 UTC (permalink / raw)
  To: a.p.zijlstra, paulus, mingo, acme; +Cc: linux-kernel

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";
+	}
 	if (!pager)
 		pager = "less";
 	else if (!*pager || !strcmp(pager, "cat"))
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-06-06  7:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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:perf/urgent] perf tools: Fix pager on minimal-install embedded systems tip-bot for Avik Sil

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.