From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E3D1C282C3 for ; Thu, 24 Jan 2019 09:06:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF8E020854 for ; Thu, 24 Jan 2019 09:06:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="skZSuc+L" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727451AbfAXJGB (ORCPT ); Thu, 24 Jan 2019 04:06:01 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:35475 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727183AbfAXJGB (ORCPT ); Thu, 24 Jan 2019 04:06:01 -0500 Received: by mail-wr1-f68.google.com with SMTP id 96so5598872wrb.2 for ; Thu, 24 Jan 2019 01:06:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=NVF8H6/p5hrpVzb41wT/47vpMkLLhHvU1vUEbEoF3lI=; b=skZSuc+LHSRHgG0YFQScPOiMPxQfIHMjyCqodotghi19MBdYJbo4JbIPxkuTgTwImr vZrcCRVJqjE/wSkNGS2B3Hm4pqv6EjWxDKJeQsZYdvKAXJ3oGCZ/cMA+rvyb4hCsVK9q rDVD5cpfnH0/syB4ToBOBiA2e27kC/ZQqdoVzAnfYC3RMtMpxY2Z8a16MoifDg2oL2eq OZKCX+1GRo30UxtHIILxlSPMmLmOd964qB8FtczrFAjdI9IOFgVjVv+lIB9W2+ziPE9y gySJH7DtRD/Va3y/LO63Ix2Rt8h0UiupxYwiQgiC8/7tAK2/nXo7rfYGGiqJx/7BrAV9 t2cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=NVF8H6/p5hrpVzb41wT/47vpMkLLhHvU1vUEbEoF3lI=; b=JHBqBIF3ektaaWDCqaBWtmw50Fx7WcSAGwO9M1/OveH+V77Iv2cJ3AnKApreJgwOA0 DXnUgFHUOHFkJF7a1ZlCCezFPckoeCvNH7qWF4vTjCoox6hyt2NrkEnE02SI/Upm3uL/ QlTMZqveFBaadq19nq/kb8sDgS7o+QFG6ecIF9D3luuKPPOGZe3JQm43DO7Uc/m5dSun YT213bklShaYoiCqZ33NnWPwaGVNZGVaxWpW7R2BbpslfFChqyyc+tUjSNfJqpTyBmZt Ydn4GpvLaojJq9diC0l72IXekmvlJQHnhfvGnamC3c5Ug6v5XEF5v/JurGVfmZfLL95B NvhQ== X-Gm-Message-State: AJcUukfl4jrUC6D3n1m66YocKpRoyTcnJZusOVlyaWWJMPm8i3FvUWbF iYg3heX/pqjSYau6VWv2zosBCA== X-Google-Smtp-Source: ALg8bN4tCvFFVbozRLRHIRAKhqdrhvlJhydKQSlRZOTUwpdKOLx5E/O4TwP9xavVnw3YcvxpHhvj2g== X-Received: by 2002:adf:9422:: with SMTP id 31mr6614707wrq.106.1548320759668; Thu, 24 Jan 2019 01:05:59 -0800 (PST) Received: from [192.168.1.2] ([194.53.187.240]) by smtp.gmail.com with ESMTPSA id n11sm37875408wrw.60.2019.01.24.01.05.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 01:05:58 -0800 (PST) Subject: Re: [PATCH bpf-next] bpftool: feature probing, change default action To: Prashant Bhole , Alexei Starovoitov , Daniel Borkmann Cc: netdev@vger.kernel.org, Jakub Kicinski References: <20190124025157.6812-1-bhole_prashant_q7@lab.ntt.co.jp> From: Quentin Monnet Message-ID: Date: Thu, 24 Jan 2019 09:05:58 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <20190124025157.6812-1-bhole_prashant_q7@lab.ntt.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2019-01-24 11:51 UTC+0900 ~ Prashant Bhole > When 'bpftool feature' is executed it shows incorrect help string. > > test# bpftool feature > Usage: bpftool bpftool probe [COMPONENT] [macros [prefix PREFIX]] > bpftool bpftool help > > COMPONENT := { kernel | dev NAME } > > Instead of fixing the help text by tweaking argv[] indices, this > patch changes the default action to 'probe'. It makes the behavior > consistent with other subcommands, where first subcommand without > extra parameter results in 'show' action. > > Signed-off-by: Prashant Bhole > --- > tools/bpf/bpftool/feature.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/bpf/bpftool/feature.c b/tools/bpf/bpftool/feature.c > index 993c6f1e5473..d672d9086fff 100644 > --- a/tools/bpf/bpftool/feature.c > +++ b/tools/bpf/bpftool/feature.c > @@ -753,8 +753,8 @@ static int do_help(int argc, char **argv) > } > > static const struct cmd cmds[] = { > - { "help", do_help }, > { "probe", do_probe }, > + { "help", do_help }, > { 0 } > }; > > Oh, thanks! This seems to be the correct thing to do indeed. Reviewed-by: Quentin Monnet