mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Cc: acme@redhat.com, mhiramat@kernel.org,
	kstewart@linuxfoundation.org, tglx@linutronix.de,
	pombredanne@nexb.com, linux-kernel@vger.kernel.org,
	peterz@infradead.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com, jolsa@redhat.com,
	namhyung@kernel.org, uneedsihyeon@gmail.com,
	kjlx@templeofstupid.com
Subject: Re: [PATCH 1/3] tools/parse-options: Add '\n' at the end of error messages
Date: Mon, 16 Apr 2018 18:25:16 +0900	[thread overview]
Message-ID: <20180416182516.1dcc96cae6a9028216cede5c@kernel.org> (raw)
In-Reply-To: <20180409110633.20767-2-ravi.bangoria@linux.vnet.ibm.com>

On Mon,  9 Apr 2018 16:36:31 +0530
Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com> wrote:

> Few error messages does not have '\n' at the end and thus next
> prompt gets printed in the same line. Ex,
> 
>   linux~$ perf buildid-cache -verbose --add ./a.out
>    Error: did you mean `--verbose` (with two dashes ?)linux~$
> 
> Fix it.

Looks good to me.

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Thanks!

> 
> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
> ---
>  tools/lib/subcmd/parse-options.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c
> index f6a1babcbac4..cb7154eccbdc 100644
> --- a/tools/lib/subcmd/parse-options.c
> +++ b/tools/lib/subcmd/parse-options.c
> @@ -433,7 +433,7 @@ static int parse_long_opt(struct parse_opt_ctx_t *p, const char *arg,
>  
>  	if (ambiguous_option) {
>  		 fprintf(stderr,
> -			 " Error: Ambiguous option: %s (could be --%s%s or --%s%s)",
> +			 " Error: Ambiguous option: %s (could be --%s%s or --%s%s)\n",
>  			 arg,
>  			 (ambiguous_flags & OPT_UNSET) ?  "no-" : "",
>  			 ambiguous_option->long_name,
> @@ -458,7 +458,7 @@ static void check_typos(const char *arg, const struct option *options)
>  		return;
>  
>  	if (strstarts(arg, "no-")) {
> -		fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)", arg);
> +		fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)\n", arg);
>  		exit(129);
>  	}
>  
> @@ -466,7 +466,7 @@ static void check_typos(const char *arg, const struct option *options)
>  		if (!options->long_name)
>  			continue;
>  		if (strstarts(options->long_name, arg)) {
> -			fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)", arg);
> +			fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)\n", arg);
>  			exit(129);
>  		}
>  	}
> -- 
> 2.14.3
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

  reply	other threads:[~2018-04-16  9:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-09 11:06 [PATCH 0/3] perf/buildid-cache: Add --list and --purge-all options Ravi Bangoria
2018-04-09 11:06 ` [PATCH 1/3] tools/parse-options: Add '\n' at the end of error messages Ravi Bangoria
2018-04-16  9:25   ` Masami Hiramatsu [this message]
2018-04-09 11:06 ` [PATCH 2/3] perf/buildid-cache: Support --list option Ravi Bangoria
2018-04-13 12:55   ` Jiri Olsa
2018-04-13 12:55   ` Jiri Olsa
2018-04-13 12:58   ` Jiri Olsa
2018-04-16  6:57     ` Ravi Bangoria
2018-04-09 11:06 ` [PATCH 3/3] perf/buildid-cache: Support --purge-all option Ravi Bangoria
2018-04-16  9:27   ` Masami Hiramatsu
2018-04-16  9:40     ` Ravi Bangoria
2018-04-16 10:30       ` Jiri Olsa
2018-04-18  5:53         ` Masami Hiramatsu

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=20180416182516.1dcc96cae6a9028216cede5c@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@redhat.com \
    --cc=kjlx@templeofstupid.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pombredanne@nexb.com \
    --cc=ravi.bangoria@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=uneedsihyeon@gmail.com \
    /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