Skip to content

nvme: rework the registry command-line interface#3465

Merged
igaw merged 1 commit into
linux-nvme:masterfrom
martin-belanger:add-yn-prompt-to-nvme-registry-cmds
Jun 22, 2026
Merged

nvme: rework the registry command-line interface#3465
igaw merged 1 commit into
linux-nvme:masterfrom
martin-belanger:add-yn-prompt-to-nvme-registry-cmds

Conversation

@martin-belanger

Copy link
Copy Markdown

Take the controller as the positional argument on retrieve, update and delete, matching every other nvme command and dropping the odd-one-out -d/--device option. As a side effect the generic " may be a namespace or mctp address" help text now applies, since registry takes a positional device like everything else.

Drop the hard -EPERM block on writing the 'owner' attribute: it protected nothing (root can edit /run/nvme/registry/ directly) yet inconsistently let 'delete' clear ownership anyway. update and delete now confirm before an operation that changes or removes ownership; scripts proceed without prompting.

While here, give delete an optional --attr to remove a single attribute (clearer than "update with no value"), and require an explicit --attr on retrieve rather than silently defaulting to 'owner'.

Take the controller as the positional <device> argument on retrieve,
update and delete, matching every other nvme command and dropping the
odd-one-out -d/--device option.

Drop the hard -EPERM block on writing the 'owner' attribute: it protected
nothing (root can edit /run/nvme/registry/ directly) yet inconsistently
let 'delete' clear ownership anyway. update and delete now confirm before
an operation that changes or removes ownership; scripts proceed without
prompting.

While here, give delete an optional --attr to remove a single attribute
(clearer than "update with no value"), and require an explicit --attr on
retrieve rather than silently defaulting to 'owner'.

Signed-off-by: Martin Belanger <martin.belanger@dell.com>
@martin-belanger martin-belanger force-pushed the add-yn-prompt-to-nvme-registry-cmds branch from 6c27f52 to 7945d33 Compare June 22, 2026 15:30
@igaw igaw merged commit 3745ec9 into linux-nvme:master Jun 22, 2026
30 of 31 checks passed
@igaw

igaw commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@martin-belanger martin-belanger deleted the add-yn-prompt-to-nvme-registry-cmds branch June 22, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants