mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Acked-by: Ingo Molnar <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
f1439c315b
commit
ea1b3ebac9
1 changed files with 4 additions and 0 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue