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: <txsyjpcxb3baog5fgqdnm5hh765nt5qcbcmllsto7uulyzr5kn@zirmqldhosbi>
Date:   Mon, 28 Aug 2023 19:02:06 +0200
From:   Daniel Wagner <dwagner@...e.de>
To:     Bart Van Assche <bvanassche@....org>
Cc:     Shinichiro Kawasaki <shinichiro.kawasaki@....com>,
        "linux-nvme@...ts.infradead.org" <linux-nvme@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        Chaitanya Kulkarni <kch@...dia.com>,
        Hannes Reinecke <hare@...e.de>,
        Sagi Grimberg <sagi@...mberg.me>,
        Jason Gunthorpe <jgg@...pe.ca>
Subject: Re: [PATCH blktests v3 3/3] nvme: introduce
 nvmet_target_{setup/cleanup} common code

On Mon, Aug 28, 2023 at 08:14:31AM -0700, Bart Van Assche wrote:
> On 8/27/23 21:13, Shinichiro Kawasaki wrote:
> > For me, your original suggestion to add "ignored_agument" looks better
> > than "$@". (or in short, "noarg" or something)
> 
> It is not clear to me what the intention is of the _nvmet_target_setup
> calls without arguments.

Create a target. That's it. It is really not that complicated.

> Is the intention to pass all arguments that have
> been passed to the caller or is the intention not to pass any
> arguments?

If there are no arguments, the indent is not to pass any arguments.

> In the latter case I think it would be wrong to suppress SC2119 because
> there really is a problem in this case.

IMO, SC2119 is not helping at all. What does it prevent? It doesn't even
understand how many arguments are supposed to be passed into a function.
The few error cases it catches are very limitted.

> How about passing -- as argument
> if the intention is not to pass any arguments? It is a well established
> convention for shell commands and shell functions to ignore the double
> hyphen if it is encountered in the argument list.

I am against adding code just to make ShellCheck happy. If there is
another way achieve this I am all ear.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ