[PATCH] nvmetcli: allow running arbitrary commands non-interactively
Daniel Wagner
wagi at monom.org
Wed Jul 8 01:35:30 PDT 2026
On Thu, Jul 31, 2025 at 05:58:49PM +0530, Nilay Shroff wrote:
> On 7/28/25 9:25 PM, Maurizio Lombardi wrote:
> > This patch refactors the command-line argument handling
> > to allow for the execution of any valid shell command directly
> > from the system's command line, without entering the interactive mode.
> >
> > Previously, only a limited, hardcoded set of
> > commands (`save`, `restore`, `clear`, `ls`) could be run
> > non-interactively.
> > This change removes the special case for the `ls` command and
> > introduces a generic mechanism that concatenates all command-line
> > arguments and executes them as a single command within the
> > `nvmetcli` shell.
> >
> > This enhancement improves the scriptability of the tool.
> >
> > For example, users can now run complex commands like:
> > $ nvmetcli /subsystems create nqn.2024-07.org.example:sub1
> > $ nvmetcli /ports ls
> >
> > The usage information has been updated to reflect this new functionality.
> >
> > Signed-off-by: Maurizio Lombardi <mlombard at redhat.com>
>
> IMO this is a useful addition to the nvmetcli tool.
> I have also tested changes and looks good to me:
>
> Reviewed-by: Nilay Shroff <nilay at linux.ibm.com>
I've applied the patch to the integration tree.
Thanks,
Daniel
More information about the Linux-nvme
mailing list