-
Notifications
You must be signed in to change notification settings - Fork 132
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
nbft: Refactor use of nvme_msg in nbft.c #669
Conversation
Changes for the issue #619. |
src/nvme/nbft.h
Outdated
@@ -1227,7 +1229,7 @@ struct nbft_info { | |||
* | |||
* Return: 0 on success, errno otherwise. | |||
*/ | |||
int nvme_nbft_read(struct nbft_info **nbft, const char *filename); | |||
int nvme_nbft_read(nvme_root_t r, struct nbft_info **nbft, const char *filename); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just passing in a nvme_root_t
root object for printing the message is not the right thing to do. During review of this code we figured that this is not the right thing to do. That's why this argument is missing.
We have the same problem for all non fabric functions that we don't have a nvme_root_t
object and we might also want to print errors etc in those functions.
The only way I see a way around this is to introduce a global variable containing the file descriptor to print to. Obviously, not totally happy with it, but what else can we do?
Thanks for your review comments. Just fixed the patch as mentioned. |
Sorry missed to set NULL the variable after the nvme root deleted so I will update the changes later. |
Fixed the patch again so now it is set NULL to the variable by deleting the root correctly. |
Signed-off-by: Tokunori Ikegami <[email protected]> [dwagner: export new function, update docs, reorder free sequence] Signed-off-by: Daniel Wagner <[email protected]>
export new function, update docs, reorder free sequence |
No description provided.