Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2050182ybk; Mon, 11 May 2020 10:39:15 -0700 (PDT) X-Google-Smtp-Source: APiQypJxYC1VgJ455sOTGWiF0hwBdqnQcK+WX51w6RHDGBGKbgQqhictNXRum+iqJ6kQmnRlIS1J X-Received: by 2002:a50:8750:: with SMTP id 16mr8693295edv.309.1589218754843; Mon, 11 May 2020 10:39:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589218754; cv=none; d=google.com; s=arc-20160816; b=koicRbOh3p6tDrb6UPYoCI3GM073DKvkqjv9b28Lue2wsJb9/RfnixZFsvMmmpeTdh HB280B4xamvtNC9QGeCKJWV+iaXPx6SRzhtU6garZHmOnUCiSX7ixT+id1BIbnBqkIk+ qEytqHc9Ew43MMCeJfVtgYc0fzWRLsB+Yf3LZLvhOAXLeCZscB4eB+6c+HNzkg/8G1Rc oSjoRAnpuXIO/qUSIqsQVMDJa4pe1SMceAy6Asi9pOxY5vZG88O8/+rmnla0x2wgzNQ+ r5t5xDvhcEZ8Bt7RR40EJOkUdPMg2uiED08xkiKxoEAVz+rWX8qdAARUJ5bU9HNdSMud LE7A== 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=HLfvP8gTUQn2fatmQ/TYKLSOqRJacvL5v2tDDQmeCBr/RHwU5prwFo2fDJ79OA0wBR EMbN74lcE6xp8VsNFdUKaSStrUuPKDgfAG4gETlwOH1OxUkBgcgvJ4RzoDyNV0wAnYhX HkhDyBAdLc1ludorOKmqElOo6G5oFSebVIXrgBnbJRRu13mA3ro+eD6mqPckhGlDIVmJ wkt/IkFfoW6bQOmWp1DeRlFqtxb380bwBM9UgGoK/cvft92hpA366ogZA1J62xarZMHo haRpOxPYWrnKXVQPbOHw8ipswuXutkv5YBuqdTyMcxAJGze4swZXsRnSqG+Ba8Z4UpGj C1ug== 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 p24si2875092eja.35.2020.05.11.10.38.51; Mon, 11 May 2020 10:39:14 -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 S1731026AbgEKRfg (ORCPT + 99 others); Mon, 11 May 2020 13:35:36 -0400 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:26398 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729698AbgEKRff (ORCPT ); Mon, 11 May 2020 13:35: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, 11 May 2020 10:35:34 -0700 Received: from sc9-mailhost2.vmware.com (unknown [10.200.192.41]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id D681E40193; Mon, 11 May 2020 10:35:34 -0700 (PDT) From: Matt Helsley To: CC: Josh Poimboeuf , Peter Zijlstra , Julien Thierry , Miroslav Benes , Steven Rostedt , Matt Helsley Subject: [RFC][PATCH 1/5] objtool: Exit successfully when requesting help Date: Mon, 11 May 2020 10:35:09 -0700 Message-ID: <10618c5e40b34a6af62c183feb5cd474c95e06fa.1588888003.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