Received: by 2002:a17:90a:bc8d:0:0:0:0 with SMTP id x13csp2384515pjr; Tue, 19 May 2020 13:57:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwiYyY3fgp1Zlqxe9EsOAO7VttPABWtrES62YbKL/lGycnKuV4hPodZ+ASGszwAroM5UHOF X-Received: by 2002:aa7:d90e:: with SMTP id a14mr628968edr.284.1589921869987; Tue, 19 May 2020 13:57:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589921869; cv=none; d=google.com; s=arc-20160816; b=PGgkW2sCzMgTZf8Xd9eWQj5eLrOa0XS39QBQrykb82RgZzbzo2YV7tSaj0+G3aH5uJ mshDABBYqmsXebPlW61dvuRWGQYAGOmnvJTG2ErYVV7MqxhI/jJjkmt/JOJfjut9eO7S SMFWvlnWaNnDmnzK3TRY6V1ea+Q9qDx/sgbFumWsev5//4U/MneYn+8zs0mTk1BPgmm5 Ojn9F3QezDVAYnDVqENgQAxRJigi8XLvqovdXrqjEpRsDs5+AmkfZz9MJycGjE/TGHXc mb+6gR2xmU63QtxjV6YO8tEsGsos+3t3u5D595+OQP+QlA7ae2u8KH8KGMnZZvqb87fv tXYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wPDfeNl4ILLkHbNARUdiXl97kyhmc22PPTK/FJ7E0os=; b=SdJrvOmcIgsHfrTaDinB1a6JA47AS+FIbyeanwsomRU3qc8fdYmF41f298C6XRU9gH Fmnb13Q/3v+2DfrUtpc6OKMYOGBoeKqyY4iiBybZLsoXphS8kGfrD/m2x9d+UK3dlktx FHUyupURbmLiCDaaHGyXC4mgEVUQxVzaKQu3+p9MBPI3UjGTTKiVA+KK/tqgUQFHSR0P FPVw7jUTBLi5F5EAbHo9Jg1pT2S73U9i65urDpQmFjeThovkq6chcfmoTcfWbIWzS5/9 LQVf8Sr0mwUHBNjEYxhbin/2IERWIgXTEgHd33HZQXxEbtQ89FrID9+qlBgWpFX48v3q SBfA== 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 u20si559767ejg.680.2020.05.19.13.57.21; Tue, 19 May 2020 13:57:49 -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 S1726893AbgESUz5 (ORCPT + 99 others); Tue, 19 May 2020 16:55:57 -0400 Received: from ex13-edg-ou-001.vmware.com ([208.91.0.189]:4149 "EHLO EX13-EDG-OU-001.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725998AbgESUz4 (ORCPT ); Tue, 19 May 2020 16:55:56 -0400 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-001.vmware.com (10.113.208.155) with Microsoft SMTP Server id 15.0.1156.6; Tue, 19 May 2020 13:55:53 -0700 Received: from sc9-mailhost2.vmware.com (unknown [10.200.192.41]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 32BC4404B7; Tue, 19 May 2020 13:55:55 -0700 (PDT) From: Matt Helsley To: CC: Josh Poimboeuf , Peter Zijlstra , Julien Thierry , Miroslav Benes , Steven Rostedt , Matt Helsley Subject: [PATCH 1/3] objtool: Exit successfully when requesting help Date: Tue, 19 May 2020 13:55:31 -0700 Message-ID: <26346796590ccf07ffe7b9d2b230435c9e787357.1589913349.git.mhelsley@vmware.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII Received-SPF: None (EX13-EDG-OU-001.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 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/objtool/objtool.c b/tools/objtool/objtool.c index 0b3528f05053..58fdda510653 100644 --- a/tools/objtool/objtool.c +++ b/tools/objtool/objtool.c @@ -58,7 +58,9 @@ static void cmd_usage(void) printf("\n"); - exit(129); + if (!help) + exit(129); + exit(0); } static void handle_options(int *argc, const char ***argv) -- 2.20.1