Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2939418ybk; Mon, 18 May 2020 11:35:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwUomGjVfGORNvkaMVfz915dwsux+UuIVWP3luvOl+Ghm/HjhtmW/ZQKFBWQE+Rbkx5XstU X-Received: by 2002:a50:d65c:: with SMTP id c28mr13966938edj.21.1589826937460; Mon, 18 May 2020 11:35:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589826937; cv=none; d=google.com; s=arc-20160816; b=eNnVgjxDd5ujIEWpQZlepJ5G5buj+oiyh9jIBLRwq+MNcpVdzcMV3d/bC8FStxVDFV IebHphOb7BwGCmqVHbE1sW6gYjGrtRnwNpR005ITLo0BtSNdyMeo0AZ6kc+OUhrfQNn/ RrDa9Smi2AewRZvOE14+YuoI2VrrV2Wc51YMNKARi/SRjLWzrh8vggUDkQ7cldGQPd/N NPPnxQtSX5Nk0BJ+Nn/JJYmKyZCCZuEe0fNjzEqONQwlf50PONIVKtpW/jZWwzruITJQ aY12YIFb5ZaHxIjTEDWIa5Vqa0zdSEmLXy7MfPDlD51liHakwKulumZXf1jN3X6MqBxJ E93A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date; bh=Nh7vQ6LpAgIdbjBdayvO5LkixYBtklKJKMtBnIPbvP8=; b=MgNys6ntVYxHO6RIpFZ+ST/XPo5NlzCwbnjpBXnI5wCf1SpO3MYrkA2Zc8psWujX3D wFJ12I3OkTsYSdIofjFgk/nTCD1K9LI1CIIZ4gbB3uY2qAUkC/xIuyB4z+EAUQhUyR5I 7vSW0sZN5bDAqdbM/ROmNOU4I/8cPOFm0cqotG+dSp3VQ+UB8xu/Xvpp7t6GXJdQ6IuZ 9dRTQHAp03NCgKoT5ULWg2fJdhT/q4hTaW0dWrCVgAr2+u/N/lER1WX8R6EXmlrLpGGR ZNI6xtQhFEqXrpYWJlqt2ynTkHxr2pZ5OhsXbpwwm3UAyuj8WpqUTB3/2LPJMH08gyDm Xqiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c21si6725532ejr.277.2020.05.18.11.35.13; Mon, 18 May 2020 11:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729189AbgERSdg (ORCPT + 99 others); Mon, 18 May 2020 14:33:36 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:32870 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728490AbgERSdf (ORCPT ); Mon, 18 May 2020 14:33:35 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Mon, 18 May 2020 11:33:34 -0700 Received: from localhost (unknown [10.200.192.41]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 1C66D40909; Mon, 18 May 2020 11:33:35 -0700 (PDT) Date: Mon, 18 May 2020 11:33:34 -0700 From: Matt Helsley To: Josh Poimboeuf CC: , Peter Zijlstra , Julien Thierry , Miroslav Benes , Steven Rostedt Subject: Re: [RFC][PATCH 1/5] objtool: Exit successfully when requesting help Message-ID: <20200518183334.GN9040@rlwimi.vmware.com> Mail-Followup-To: Matt Helsley , Josh Poimboeuf , linux-kernel@vger.kernel.org, Peter Zijlstra , Julien Thierry , Miroslav Benes , Steven Rostedt References: <10618c5e40b34a6af62c183feb5cd474c95e06fa.1588888003.git.mhelsley@vmware.com> <20200515195253.c5yzjyigxzhjflsd@treble> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20200515195253.c5yzjyigxzhjflsd@treble> Received-SPF: None (EX13-EDG-OU-002.vmware.com: mhelsley@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 02:52:53PM -0500, Josh Poimboeuf wrote: > On Mon, May 11, 2020 at 10:35:09AM -0700, Matt Helsley wrote: > > When the user requests help it's not an error so do not exit with > > a non-zero exit code. This is not especially useful for a user but > > any script that might wish to check that objtool --help is at least > > available can't rely on the exit code to crudely check that, for > > example building an objtool executable succeeds. > > > > Signed-off-by: Matt Helsley > > --- > > tools/objtool/objtool.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c > > index 0b3528f05053..593ec85915a9 100644 > > --- a/tools/objtool/objtool.c > > +++ b/tools/objtool/objtool.c > > @@ -58,7 +58,10 @@ static void cmd_usage(void) > > > > printf("\n"); > > > > - exit(129); > > + if (!help) > > + exit(129); > > + else > > + exit(0); > > Looks fine, though the 'else' isn't needed. OK, removed the 'else'. Cheers, -Matt Helsley