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

nvme-print-json: update JSON verbose output for nvm-id-ctrl #2524

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

martin-gpy
Copy link
Contributor

Update the nvme-id-ctrl JSON verbose output for parity with this command's normal verbose output.

Update the nvme-id-ctrl JSON verbose output for parity with this
command's normal verbose output.

Signed-off-by: Martin George <[email protected]>
@@ -3072,6 +3072,15 @@ static void json_nvme_id_ctrl_nvm(struct nvme_id_ctrl_nvm *ctrl_nvm)
obj_add_uint64(r, "dmsl", le64_to_cpu(ctrl_nvm->dmsl));
obj_add_uint(r, "aocs", le16_to_cpu(ctrl_nvm->aocs));

if (json_print_ops.flags & VERBOSE) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder if we should always print everything. For me the verbose flag makes only sense for the stdout output.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel it helps. And also maintains consistency with the JSON verbose outputs of other basic commands such as list -v -o json , list-subsys -v -o json, etc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

My point is that the json output could always print everything, no need make it short. Anyway, your change is fine, let's go with it, I ponder a bit if we should just kill the 'verbose' flag in the json output.

@igaw igaw merged commit f7f1923 into linux-nvme:master Oct 4, 2024
17 checks passed
@igaw
Copy link
Collaborator

igaw commented Oct 4, 2024

Thanks!

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