mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Avik Sil <avik.sil@linaro.org>
Cc: a.p.zijlstra@chello.nl, paulus@samba.org, mingo@redhat.com,
	acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Perf: Use /usr/bin/pager if available for perf pager
Date: Tue, 29 May 2012 11:45:06 +0100	[thread overview]
Message-ID: <20120529114506.7c8d6157@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <1338287725-26382-1-git-send-email-avik.sil@linaro.org>

On Tue, 29 May 2012 16:05:25 +0530
Avik Sil <avik.sil@linaro.org> wrote:

> 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";
> +	}

What is "portable" about /usr/bin/pager ? and what is wrong with just
doing

export PAGER=/usr/bin/pager

Alan

  reply	other threads:[~2012-05-29 10:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 10:35 Avik Sil
2012-05-29 10:45 ` Alan Cox [this message]
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

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=20120529114506.7c8d6157@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=avik.sil@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    /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