From: Martin George Date: Thu, 3 Oct 2024 17:20:24 +0000 (+0530) Subject: nvme-print-json: update JSON verbose output for nvm-id-ctrl X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f7f192363e7b4ab0aa18e9766fc7fb9644619a37;p=users%2Fsagi%2Fnvme-cli.git nvme-print-json: update JSON verbose output for nvm-id-ctrl Update the nvme-id-ctrl JSON verbose output for parity with this command's normal verbose output. Signed-off-by: Martin George --- diff --git a/nvme-print-json.c b/nvme-print-json.c index cd342470..b2890738 100644 --- a/nvme-print-json.c +++ b/nvme-print-json.c @@ -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); }