Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp909403ybb; Fri, 10 Apr 2020 12:37:12 -0700 (PDT) X-Google-Smtp-Source: APiQypKvnjMPdFCxDT/YJYDedl/qudOVqn+LLdD8lk+CN7LBYC/ZDYnMrQInRUoHi/3gYY5xtUMS X-Received: by 2002:a37:a9cc:: with SMTP id s195mr5393405qke.124.1586547432655; Fri, 10 Apr 2020 12:37:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586547432; cv=none; d=google.com; s=arc-20160816; b=vF/qb5lpDtIsPYdSGeq17Rr9WZpk/MvomWlDi8gI1uW8p7Ph2DrqM7nhSpbeCMefkN rYtAl8SGNmYLlkMhHCgNa2hKtp5keaPE/08OEtKjFY7p4wFvz5QiKd7c/0n5L2NEIijD Wvo6VAkuuuhcftlNqQSYtG7CPFEoM66kq2K2swJsIX6wgBJgNhm/yeiWx38Gf8B/+S74 RkIXunPVTWTE8NEqp12tQALUMKdpTtX42Hq0bTeFa3DlutLjg4Ga35xFGEaSlIN8nY+y XYGIeH+wppwmutv5dgM/qGMR8m2tqzJ/dxMmxennOpu5GDyEUpvd4OE8CN+lXanE5QMs RmWQ== 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=jve+7kmyjkepHT/hLy4xt7yOWLm2iM++gvuRFdP9WVA=; b=n+NJl/dEpnsFWXKhdGAtqOyq8QK2jWL3LLGc0vUSLJ9/3mEE+QNTD5SmEkTibQL51I HJ2ghZM7+nZd5/wRJUNiC7I7OiskTqSIIcocJgg1sm/PGD2tuYWUpxCocpx3n9MYV5Yq 3k2/ANcnq+pXoXUMmF5YCgFuyUwcbm1mZfTJZKB3+fnHw6uWompP8ppmQUbMeDvyIDFg kkuvm2UT2XOBa78gzgUhk3C3arDhHOePQTaTc+Fn9ridlXJocARYB2pXsRPkTn/gOsWC GGqf+y4AXVj6/RD5IFZbomNkBmG2vM2QWlqG8yyOuDovF+Qr9JuXMe77BpFhkUG++dEj zQhA== 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=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si1796693qke.104.2020.04.10.12.36.58; Fri, 10 Apr 2020 12:37:12 -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=QUARANTINE sp=NONE dis=NONE) header.from=vmware.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726701AbgDJTgQ (ORCPT + 99 others); Fri, 10 Apr 2020 15:36:16 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:37087 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726203AbgDJTgQ (ORCPT ); Fri, 10 Apr 2020 15:36:16 -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; Fri, 10 Apr 2020 12:36:11 -0700 Received: from sc9-mailhost3.vmware.com (unknown [10.166.69.226]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 8A89D40BB1; Fri, 10 Apr 2020 12:36:15 -0700 (PDT) From: Matt Helsley To: CC: Josh Poimboeuf , Peter Zijlstra , Julien Thierry , Ingo Molnar , Steven Rostedt , Miroslav Benes , Matt Helsley Subject: [RFC][PATCH 01/36] objtool: Exit successfully when requesting help Date: Fri, 10 Apr 2020 12:35:24 -0700 Message-ID: <91239ed2f7b4d40fc4ffaff6457550ef49618830.1586468801.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-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 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); } static void handle_options(int *argc, const char ***argv) -- 2.20.1