]> www.infradead.org Git - users/hch/nvme-cli.git/commitdiff
nvme-print: fix to print ctrltype when human-readable
authorMinwoo Im <minwoo.im@samsung.com>
Tue, 10 Sep 2019 14:15:57 +0000 (23:15 +0900)
committerMinwoo Im <minwoo.im@samsung.com>
Tue, 10 Sep 2019 14:15:57 +0000 (23:15 +0900)
The controller type should be printed out when the human-readable
option is given.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
nvme-print.c

index 8fdab57f0b482f7afa81a91f7c2f44cdcf76b393..55c44479221d79b4d8ffffdc63f0b26b8cb2567d 100644 (file)
@@ -1105,6 +1105,7 @@ void __show_nvme_id_ctrl(struct nvme_id_ctrl *ctrl, unsigned int mode, void (*ve
                show_nvme_id_ctrl_ctratt(ctrl->ctratt);
        printf("rrls      : %#x\n", le16_to_cpu(ctrl->rrls));
        printf("cntrltype : %d\n", ctrl->cntrltype);
+       if (human)
                show_nvme_id_ctrl_cntrltype(ctrl->cntrltype);
        printf("fguid     : %-.*s\n", (int)sizeof(ctrl->fguid), ctrl->fguid);
        printf("crdt1     : %u\n", le16_to_cpu(ctrl->crdt1));