Skip to content

log: Introduce libnvme error codes#173

Merged
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:add-error-codes
Jan 14, 2022
Merged

log: Introduce libnvme error codes#173
igaw merged 1 commit intolinux-nvme:masterfrom
igaw:add-error-codes

Conversation

@igaw
Copy link
Copy Markdown
Collaborator

@igaw igaw commented Jan 14, 2022

Add libnvme specific error codes which map to a specific error
message. The system error codes in errno are too overloaded to figure
out what is going wrong.

With this we can remove the nvme_log_message buffer. This avoids
having a global library buffer.

Signed-off-by: Daniel Wagner dwagner@suse.de

Fixes: #160

@igaw igaw added the enhancement New feature or request label Jan 14, 2022
@igaw igaw added this to the 1.0 milestone Jan 14, 2022
Comment thread src/nvme/fabrics.c Outdated
Comment thread src/nvme/tree.c Outdated
Comment thread src/nvme/tree.c Outdated
Comment thread src/nvme/tree.c Outdated
Add libnvme specific error codes which map to a specific error
message. The system error codes in errno are too overloaded to figure
out what is going wrong.

With this we can remove the nvme_log_message buffer. This avoids
having a global library buffer.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Comment thread src/nvme/fabrics.c
if (ret)
return ret;
if (ret) {
errno = -ret;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Aren't the error numbers positive?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ah, screw that. I misread the code.

@hreinecke
Copy link
Copy Markdown
Collaborator

So, this looks good. Should be ready to merge.

Reviewed-by: Hannes Reinecke <hare@suse.de.

@igaw igaw merged commit 7c39cf1 into linux-nvme:master Jan 14, 2022
@igaw igaw deleted the add-error-codes branch January 14, 2022 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants