From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Kicinski Subject: [PATCH net-next 4/8] tools: bpftool: add `bpftool prog help` as real command i.r.t exit code Date: Thu, 19 Oct 2017 15:46:22 -0700 Message-ID: <20171019224626.31608-5-jakub.kicinski@netronome.com> References: <20171019224626.31608-1-jakub.kicinski@netronome.com> Cc: oss-drivers@netronome.com, Quentin Monnet , Jakub Kicinski To: netdev@vger.kernel.org Return-path: Received: from mail-pf0-f195.google.com ([209.85.192.195]:48373 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753115AbdJSWrJ (ORCPT ); Thu, 19 Oct 2017 18:47:09 -0400 Received: by mail-pf0-f195.google.com with SMTP id b79so8111760pfk.5 for ; Thu, 19 Oct 2017 15:47:09 -0700 (PDT) In-Reply-To: <20171019224626.31608-1-jakub.kicinski@netronome.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Quentin Monnet Make error messages and return codes more consistent. Specifically, make `bpftool prog help` a real command, instead of printing usage by default for a non-recognized "help" command. Output is the same, but this makes bpftool return with a success value instead of an error. Signed-off-by: Quentin Monnet Signed-off-by: Jakub Kicinski --- tools/bpf/bpftool/prog.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/bpf/bpftool/prog.c b/tools/bpf/bpftool/prog.c index 6c03d2ea3f79..355c14325622 100644 --- a/tools/bpf/bpftool/prog.c +++ b/tools/bpf/bpftool/prog.c @@ -475,6 +475,7 @@ static int do_help(int argc, char **argv) static const struct cmd cmds[] = { { "show", do_show }, + { "help", do_help }, { "dump", do_dump }, { "pin", do_pin }, { 0 } -- 2.14.1