lkml.org 
[lkml]   [2016]   [Jan]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/4] perf ui/tui: Print helpline message as is
Em Mon, Jan 11, 2016 at 07:53:14PM +0900, Namhyung Kim escreveu:
> When a tip message contains a percent sign, it was treated printf format
> specifier so broken string was printed like below.
>
> Tip: Limit to show entries above 577nly: perf report --percent-limit 5
> ^^^
>
> As ui_browser__show receives format string, pass additional "%s" so that
> the help (tip) message can be printed as is.
>
> Tip: Limit to show entries above 5% only: perf report --percent-limit 5

Applied.

> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
> tools/perf/ui/browsers/hists.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
> index 901d481e6cea..08c09ad755d2 100644
> --- a/tools/perf/ui/browsers/hists.c
> +++ b/tools/perf/ui/browsers/hists.c
> @@ -480,7 +480,7 @@ static int hist_browser__run(struct hist_browser *browser, const char *help)
>
> hists__browser_title(browser->hists, hbt, title, sizeof(title));
>
> - if (ui_browser__show(&browser->b, title, help) < 0)
> + if (ui_browser__show(&browser->b, title, "%s", help) < 0)
> return -1;
>
> while (1) {
> --
> 2.6.4

\
 
 \ /
  Last update: 2016-01-12 17:21    [W:0.067 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site