Received: by 10.213.65.68 with SMTP id h4csp2471711imn; Mon, 9 Apr 2018 04:10:39 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+IhuEBcxRG10EIM44CH/D/i+ccomGI/tNJKcRNSvPU9UWqHpF7vBUjTxHVP3pngqqp4Ifi X-Received: by 2002:a17:902:24c7:: with SMTP id l7-v6mr37964636plg.320.1523272239395; Mon, 09 Apr 2018 04:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523272239; cv=none; d=google.com; s=arc-20160816; b=z3jkYQYCIjhIX8ONJd3qV3mMwelVGvQc4HfFjc3jUw4ndjJ6rsAc6LxhKQYvgAuNaT DhGynrXVkfOdghes1ECPAJ2g7DYVeueABWZltIRVWhdoPAKbBpHaHLZOgfBuehm6Ko5j aa9B0UzkzM/kTdqwmQzo13yE0xd7RIlmevfdK3L5+JobfCLtI4weXg+rahfuzdc2DP1i 2jArGhffW/k7vggoVGJi+dzhftRv+Bh95YirzkCtQSmdjoUzuDEA553+l2tW/qVRCN1D sLJXVK7ajzUzZkg9wD6Gl3t4SaULCXGcFYMeMB+nnXQ8kpa6fzZx5XsCYzClIvN58G09 9RdA== 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=/7L7JGRpSjbxXHrLwPwjy9imBUcie5JMOl4c/D7JZtk=; b=gaf1X+HdBBh26KDXX0SHmhCMk8PGxGaFlSP6aLdlL0AlWNWN8RFJE9vp6MfZUJoglE YOl/WS1QJHLgLkwOK/TOItFw+jGYX7fPH3yG7/8SbWVn5t/uyVjsH0ufo+eihAsq8yTr Pt3+ae4tcLLbE5K+NVKZmLV99d2RDmTNEuT5BnsqKVG22tz680QmroJszoRYMvbi+V8s ucwGdN1GC/pdSeRd8rUAvvXaNAV0gOwQqpOgB2sUmjT/GWaYIdbCwRt1dLka+jrrdaGK RR4BWBj3pc6qfXXtGQTtch5iFvbVrSGeB/2Jhaq4K4s0z4ugKZG1NnYSyhXy7auLmoXq uwIA== 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 m12-v6si63092pln.302.2018.04.09.04.10.02; Mon, 09 Apr 2018 04:10:39 -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 S1751774AbeDILHC (ORCPT + 99 others); Mon, 9 Apr 2018 07:07:02 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:59782 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750952AbeDILG6 (ORCPT ); Mon, 9 Apr 2018 07:06:58 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w39B5Shj113162 for ; Mon, 9 Apr 2018 07:06:57 -0400 Received: from e06smtp12.uk.ibm.com (e06smtp12.uk.ibm.com [195.75.94.108]) by mx0b-001b2d01.pphosted.com with ESMTP id 2h870bg1rc-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Mon, 09 Apr 2018 07:06:57 -0400 Received: from localhost by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 9 Apr 2018 12:06:55 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 9 Apr 2018 12:06:50 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w39B6oRF17498590; Mon, 9 Apr 2018 11:06:50 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 58FF311C052; Mon, 9 Apr 2018 11:58:58 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0E90811C04C; Mon, 9 Apr 2018 11:58:56 +0100 (BST) Received: from bangoria.in.ibm.com (unknown [9.124.31.66]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 9 Apr 2018 11:58:55 +0100 (BST) From: Ravi Bangoria To: acme@redhat.com Cc: 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, Ravi Bangoria Subject: [PATCH 1/3] tools/parse-options: Add '\n' at the end of error messages Date: Mon, 9 Apr 2018 16:36:31 +0530 X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180409110633.20767-1-ravi.bangoria@linux.vnet.ibm.com> References: <20180409110633.20767-1-ravi.bangoria@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18040911-0008-0000-0000-000004E85005 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18040911-0009-0000-0000-00001E7B73C0 Message-Id: <20180409110633.20767-2-ravi.bangoria@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-09_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 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-1804090121 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 --- 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