nvme: output copy command success message for json format#2818
Merged
igaw merged 4 commits intolinux-nvme:masterfrom May 20, 2025
Merged
nvme: output copy command success message for json format#2818igaw merged 4 commits intolinux-nvme:masterfrom
igaw merged 4 commits intolinux-nvme:masterfrom
Conversation
Use nvme_show_key_value() to output the message as json format. Signed-off-by: Tokunori Ikegami <[email protected]>
Add the json_init counter to create josn object exclusively. Also change json_output_key_value() to trim key string white spaces. Signed-off-by: Tokunori Ikegami <[email protected]>
Also change dev_close() to call nvme_show_finish() as same. Signed-off-by: Tokunori Ikegami <[email protected]>
igaw
reviewed
May 19, 2025
|
|
||
| #include "logging.h" | ||
| #include "sighdl.h" | ||
| #include "nvme-print.h" |
Collaborator
There was a problem hiding this comment.
I would like to avoid pulling in something from the parent directly into the util folder. Looking at what loggin.c does I suggest just move it to the parent folder.
igaw
reviewed
May 19, 2025
|
|
||
| int log_level; | ||
| static bool dry_run; | ||
| static bool dry_run_state; |
Collaborator
There was a problem hiding this comment.
... and then you can just directly use the dry_run. so you can delete this definition.
igaw
reviewed
May 19, 2025
| { | ||
| dry_run = enable; | ||
| dry_run_state = enable; | ||
| } |
Collaborator
There was a problem hiding this comment.
also we don't need this setter anymore.
Use nvme_show_key_value() to output the message as json format. Also changed to use nvme_cfg.dry_run instead of the dry_run. And moved the logging.c to the pararent directly to pull. Signed-off-by: Tokunori Ikegami <[email protected]>
6b11862 to
a3643d1
Compare
Contributor
Author
|
Fixed as suggested. Thank you. |
Collaborator
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use nvme_show_key_value() to output the message as json format.