Received: by 10.192.165.156 with SMTP id m28csp1399106imm; Mon, 16 Apr 2018 21:16:07 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/42I8m2skGb5C+SebPt/hvdcqg4sWppDSsL3WMZMpry601LrFovojfz+ieOZIEOY3GpJ29 X-Received: by 2002:a17:902:bb8c:: with SMTP id m12-v6mr557671pls.53.1523938567938; Mon, 16 Apr 2018 21:16:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523938567; cv=none; d=google.com; s=arc-20160816; b=fCaR4rS8T1JtaKNTkIGSwjEbEIy9bbtwjIJokBo2JxftwIxHusgCqgej0jHOt1TLZG DAnXdD4BQCMkfylTCgKUgq8AcHUkQeOTypseEbkP9q/hHsgbmPUMzr4ED4YtdHPOWFrx 4tGg1bIv182ZcdOsgVu04TyvRmKjIypirOKxOgV4SSROlFXJewq6bL9a7h7Q3MfUdTuq 7bwxjuxt3Ya0SePqvzF1m67PWbnV8zkTX2tJhF+AWgWR5Zv4iZ7v1B1MyKzTpTbrBnst JjL5DH8GO9qwLw6ox1y+Ds0ZYQlh5asXYe16rLA+i07J4JoRF0xjXMtTD8YjWf4915X2 ueQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=l0x6dMIG+4+9qKE/QOV/2SqK7Ekvw2FiQOdCFPE2dh4=; b=X2fVVAaOUSlgD3nRKhxMzBezL9euWcR4VDNFd22kOg47Qjx7HCjeDNzxJqGNeiInn1 n2/j/hPw436U2yXmwTZjxuqR4zJ29bls9/55x9eQdBtXdvE4FiF3t8Fza/8/Ltc8HKkx 1pACB4Q9G0piSr5tyC+qHvwyDsxALLY6z5H2u1Di1sl0i+wz+LfsYXA8ObAlUEi4wmWk eER4BkG4/ThGcF64OnnTwgEasDU9N3G7EQGR96XPGXvUcBkB4W75phuTfmmPrKZ+Q35h KCQWN/NfEb+Ijbe+ulMN+gH2oroRAryr0Lxm+E2PzA4DrAdMcCcApszhicjnml3nYm9y kaow== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i186si12208549pfg.218.2018.04.16.21.15.53; Mon, 16 Apr 2018 21:16:07 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752507AbeDQEOH (ORCPT + 99 others); Tue, 17 Apr 2018 00:14:07 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59496 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752252AbeDQEOD (ORCPT ); Tue, 17 Apr 2018 00:14:03 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3H492oX028074 for ; Tue, 17 Apr 2018 00:14:03 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hd3vbcfe2-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Tue, 17 Apr 2018 00:14:03 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 17 Apr 2018 05:14:00 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 17 Apr 2018 05:13:57 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3H4Du4346203050; Tue, 17 Apr 2018 04:13:56 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6C34CA404D; Tue, 17 Apr 2018 05:06:06 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 31659A4040; Tue, 17 Apr 2018 05:06:04 +0100 (BST) Received: from bangoria.in.ibm.com (unknown [9.124.31.151]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 17 Apr 2018 05:06:04 +0100 (BST) From: Ravi Bangoria To: mhiramat@kernel.org, jolsa@redhat.com, acme@redhat.com Cc: 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, namhyung@kernel.org, uneedsihyeon@gmail.com, kjlx@templeofstupid.com, Ravi Bangoria Subject: [PATCH v2 1/3] tools/parse-options: Add '\n' at the end of error messages Date: Tue, 17 Apr 2018 09:43:44 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180417041346.5617-1-ravi.bangoria@linux.vnet.ibm.com> References: <20180417041346.5617-1-ravi.bangoria@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18041704-0040-0000-0000-0000044E530C X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041704-0041-0000-0000-000020F29848 Message-Id: <20180417041346.5617-2-ravi.bangoria@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-17_02:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804170038 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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