-
Notifications
You must be signed in to change notification settings - Fork 695
nvme: output copy command success message for json format #2818
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
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]>
|
|
||
| #include "logging.h" | ||
| #include "sighdl.h" | ||
| #include "nvme-print.h" |
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.
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.
util/logging.c
Outdated
|
|
||
| int log_level; | ||
| static bool dry_run; | ||
| static bool dry_run_state; |
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.
... and then you can just directly use the dry_run. so you can delete this definition.
util/logging.c
Outdated
| { | ||
| dry_run = enable; | ||
| dry_run_state = enable; | ||
| } |
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.
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
|
Fixed as suggested. Thank you. |
|
Thanks! |
Use nvme_show_key_value() to output the message as json format.