Received: by 10.192.165.148 with SMTP id m20csp1099746imm; Sat, 21 Apr 2018 00:57:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx494nDg16TnOUBtu6KupXf1zHxkmZ67XZSGR54uC992MeNs3NyzBNCzeSarUkqQYTnz2Yr+3 X-Received: by 10.98.59.24 with SMTP id i24mr12151386pfa.246.1524297455112; Sat, 21 Apr 2018 00:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524297455; cv=none; d=google.com; s=arc-20160816; b=ye7LNzpmpgNwnGRj8IT9ktOhCjQJq5MFutQNigycPlREDM63Ydich0cmafU2tTSQJ2 VAyPS38gL2UXaQzpJcGwRrikU1sJbUoXFp5dpNk8poMbfizCMUNkJ43cOe6oxL8h+gG8 c6qrh67YK/F8l+WhUR+uj5br0FqptlZuP/nikikeyMBksrF36pbTcyC71Ub+m785ELeL Qo/1GivR+eCC3siuXjYaPNd4zlnHkJRM5bpIcOr61no8YHB8uaYXmS+HixMYGX8sVkA2 QACrGrCfUZ/Bseb8Ifdj8oZ8rBimjeuufgB3nnhgYTfpCLlxMf3xYQymEL9yGOm9wws5 /5/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=2GUm/WcDReTv61IQkRILvBNLf2AUVgKisxQx2XUtGoY=; b=Dsc04p6qyqLEDtCqgiQxB3nyMuTYBujGhBbvMKU25s1FSpIGo0UFykomerddZdizHT 3fW0N7MIFXeFV5jXjNIDRc920jk6S32Nl83PvXLXiEBAb7ODQLPjTuFdS94HC6kCuj7x p0mbjJZPO2NF/fa8bwCnmLXMolXEra4tulDqoRv32gaYxoIqhqZuriKqSZmly9tZ+jm6 CRV+Q2boLVhtB55TDb+srA4Tc0H9jv1CLV97aB7MjhmgiscYmqTrV/2G211qgV48FJsv wq7Qn/UFy10bauOS+5gL/qNRcs+uG5wf2IwNrj15HrTgY3i3Bi5M8rELE0E3ayRr6zVM C/8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2-v6si7261693plt.406.2018.04.21.00.56.58; Sat, 21 Apr 2018 00:57:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753299AbeDUHxV (ORCPT + 99 others); Sat, 21 Apr 2018 03:53:21 -0400 Received: from terminus.zytor.com ([198.137.202.136]:43461 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbeDUHxU (ORCPT ); Sat, 21 Apr 2018 03:53:20 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTP id w3L7qufC2474703; Sat, 21 Apr 2018 00:52:56 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w3L7quYC2474700; Sat, 21 Apr 2018 00:52:56 -0700 Date: Sat, 21 Apr 2018 00:52:56 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Ravi Bangoria Message-ID: Cc: mingo@kernel.org, jolsa@redhat.com, tglx@linutronix.de, pombredanne@nexb.com, uneedsihyeon@gmail.com, ravi.bangoria@linux.vnet.ibm.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, mhiramat@kernel.org, kstewart@linuxfoundation.org, hpa@zytor.com, namhyung@kernel.org, kjlx@templeofstupid.com, acme@redhat.com, peterz@infradead.org Reply-To: uneedsihyeon@gmail.com, pombredanne@nexb.com, tglx@linutronix.de, jolsa@redhat.com, mingo@kernel.org, mhiramat@kernel.org, hpa@zytor.com, kstewart@linuxfoundation.org, linux-kernel@vger.kernel.org, alexander.shishkin@linux.intel.com, ravi.bangoria@linux.vnet.ibm.com, kjlx@templeofstupid.com, namhyung@kernel.org, peterz@infradead.org, acme@redhat.com In-Reply-To: <20180417041346.5617-2-ravi.bangoria@linux.vnet.ibm.com> References: <20180417041346.5617-2-ravi.bangoria@linux.vnet.ibm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] perf tools: Add '\n' at the end of parse-options error messages Git-Commit-ID: 66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-0.8 required=5.0 tests=ALL_TRUSTED,BAYES_00, FREEMAIL_FORGED_REPLYTO autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Gitweb: https://git.kernel.org/tip/66f5a0779af2a4f28b1832f6c20bc9d3b1ab1886 Author: Ravi Bangoria AuthorDate: Tue, 17 Apr 2018 09:43:44 +0530 Committer: Arnaldo Carvalho de Melo CommitDate: Wed, 18 Apr 2018 15:35:51 -0300 perf tools: Add '\n' at the end of parse-options error messages 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. Signed-off-by: Ravi Bangoria Reviewed-by: Masami Hiramatsu Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Kate Stewart Cc: Krister Johansen Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Philippe Ombredanne Cc: Sihyeon Jang Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20180417041346.5617-2-ravi.bangoria@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo --- 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 @@ match: 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); } }