From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753874AbdJNOie (ORCPT ); Sat, 14 Oct 2017 10:38:34 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:34068 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753823AbdJNOia (ORCPT ); Sat, 14 Oct 2017 10:38:30 -0400 Subject: Re: [PATCH] objtool: Print top level commands on incorrect usage To: Josh Poimboeuf References: <1507882872-26138-1-git-send-email-kamalesh@linux.vnet.ibm.com> <20171013163821.2dnqljq2lxyvkfqu@treble> Cc: linux-kernel@vger.kernel.org, Ingo Molnar From: Kamalesh Babulal Date: Sat, 14 Oct 2017 20:08:21 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20171013163821.2dnqljq2lxyvkfqu@treble> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 17101414-0008-0000-0000-0000049FD042 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17101414-0009-0000-0000-00001E31F3E4 Message-Id: <63bd68eb-38d9-16b8-099f-bbc53aec40cb@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-14_01:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710140208 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday 13 October 2017 10:08 PM, Josh Poimboeuf wrote: [...] >> Signed-off-by: Kamalesh Babulal >> --- >> tools/objtool/objtool.c | 6 ++---- >> 1 file changed, 2 insertions(+), 4 deletions(-) >> >> diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c >> index 31e0f91..07f3299 100644 >> --- a/tools/objtool/objtool.c >> +++ b/tools/objtool/objtool.c >> @@ -70,7 +70,7 @@ static void cmd_usage(void) >> >> printf("\n"); >> >> - exit(1); >> + exit(129); > > For consistency with the rest of the code, this should be -1 instead of > 129 (though the end result is the same). > Thanks for the review. exit(129) is returned by command line parser when the usage is incorrect, except for cmd_usage(), where the exit code 1. I will re-send the patch with the better commit message. -- cheers, Kamalesh.