On Thu, May 10, 2012 at 12:30:52PM -0000, Avik Sil 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";
To conform to the existing code style, you might want to write the code as follows: + if (!pager) { + if (!access("/usr/bin/pager", X_OK)) + pager = "/usr/bin/pager"; + } + if (!pager) + pager = "less"; Functionally, the code looks OK to me either way. Cheers ---Dave -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/833101 Title: perf uses less at the default pager, but the linux-tools packages have no dependency for it To manage notifications about this bug go to: https://bugs.launchpad.net/linaro-ubuntu/+bug/833101/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs