Skip to content

Commit

Permalink
nvme-print-json: update JSON verbose output for nvm-id-ctrl
Browse files Browse the repository at this point in the history
Update the nvme-id-ctrl JSON verbose output for parity with this
command's normal verbose output.

Signed-off-by: Martin George <[email protected]>
  • Loading branch information
martin-gpy authored and igaw committed Oct 4, 2024
1 parent 4cdd3f8 commit f7f1923
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nvme-print-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
__u16 rsvd = (ctrl_nvm->aocs & 0xfffe) >> 1;
__u8 ralbas = ctrl_nvm->aocs & 0x1;

if (rsvd)
obj_add_uint(r, "[15:1]: Reserved", rsvd);
obj_add_uint(r, "[0:0]: Reporting Allocated LBA Supported", ralbas);
}

json_print(r);
}

Expand Down

0 comments on commit f7f1923

Please sign in to comment.