lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzbyE8w1wLN33OfUgu8qGqRbxE5LbXFniucyqW4mH7mQFw@mail.gmail.com>
Date:   Thu, 23 May 2019 13:57:18 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Jakub Kicinski <jakub.kicinski@...ronome.com>
Cc:     Quentin Monnet <quentin.monnet@...ronome.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>, bpf@...r.kernel.org,
        Networking <netdev@...r.kernel.org>, oss-drivers@...ronome.com,
        Yonghong Song <yhs@...com>
Subject: Re: [PATCH bpf-next v2 1/3] tools: bpftool: add -d option to get
 debug output from libbpf

On Thu, May 23, 2019 at 1:44 PM Jakub Kicinski
<jakub.kicinski@...ronome.com> wrote:
>
> On Thu, 23 May 2019 09:20:52 -0700, Andrii Nakryiko wrote:
> > On Thu, May 23, 2019 at 3:54 AM Quentin Monnet wrote:
> > >
> > > libbpf has three levels of priority for output messages: warn, info,
> > > debug. By default, debug output is not printed to the console.
> > >
> > > Add a new "--debug" (short name: "-d") option to bpftool to print libbpf
> > > logs for all three levels.
> > >
> > > Internally, we simply use the function provided by libbpf to replace the
> > > default printing function by one that prints logs regardless of their
> > > level.
> > >
> > > v2:
> > > - Remove the possibility to select the log-levels to use (v1 offered a
> > >   combination of "warn", "info" and "debug").
> > > - Rename option and offer a short name: -d|--debug.
> >
> > Such and option in CLI tools is usually called -v|--verbose, I'm
> > wondering if it might be a better name choice?
> >
> > Btw, some tools also use -v, -vv and -vvv to define different levels
> > of verbosity, which is something we can consider in the future, as
> > it's backwards compatible.
>
> That was my weak suggestion.  Sometimes -v is used for version, e.g.
> GCC.  -d is sometimes used for debug, e.g. man, iproute2 uses it as
> short for "detailed".  If the consensus is that -v is better I don't
> really mind.

It's minor, so I'm not insisting at all, just wasn't sure it was
brought up. bpftool is sufficiently different in its conventions from
other modern CLIs anyways.

As for -v for version. It seems like the trend is to use -V|--version
for version, and -v|--verbose for verbosity. I've also seen some tools
option for `cli version` (subcommand) for version. Anyway, no strong
preferences from me either.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ