Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fabrics: update return values for dim #2575

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

martin-gpy
Copy link
Contributor

The nvme dim command returns a zero even for failure scenarios as shown below:

nvme0 DIM register command error. Status:0xffffffff - Operation not supported

echo $?
0

Fix this by ensuring appropriate values are returned for success and failure scenarios. And while at it, remove a couple of superfluous braces too here.

Copy link
Collaborator

@igaw igaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use nvme_status_to_errno instead returning the status directly.

fabrics.c Outdated Show resolved Hide resolved
The nvme dim command returns a zero even for failure scenarios
as shown below:

nvme0 DIM register command error. Status:0xffffffff -
Operation not supported

echo $?
0

Fix this by ensuring appropriate values are returned for success
and failure scenarios. And while at it, remove a couple of
superfluous braces too here.

Signed-off-by: Martin George <[email protected]>
@igaw igaw merged commit 98b34e4 into linux-nvme:master Nov 22, 2024
17 checks passed
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