Comment 17 for bug 833101

Revision history for this message
Avik Sil (aviksil) wrote :

Does this patch look OK?

diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c
index 1915de2..d6f23de 100644
--- a/tools/perf/util/pager.c
+++ b/tools/perf/util/pager.c
@@ -57,8 +57,12 @@ void setup_pager(void)
        }
        if (!pager)
                pager = getenv("PAGER");
- if (!pager)
- pager = "less";
+ if (!pager) {
+ if (!access("/usr/bin/pager", X_OK))
+ pager = "/usr/bin/pager";
+ else
+ pager = "less";
+ }
        else if (!*pager || !strcmp(pager, "cat"))
                return;