]> www.infradead.org Git - users/hch/nvme-cli.git/commit
nvme: Support raw_binary and json format for show-regs
authorMinwoo Im <minwoo.im.dev@gmail.com>
Sat, 6 Apr 2019 21:01:17 +0000 (06:01 +0900)
committerMinwoo Im <minwoo.im.dev@gmail.com>
Sat, 6 Apr 2019 21:06:54 +0000 (06:06 +0900)
commit6317d3841e984533f055c77166c9e170f979df37
treeb6f43caad9725be3b10c52279022a0f4eff193c0
parent3b8b39c973524732df7416205f643cfcb4d607a3
nvme: Support raw_binary and json format for show-regs

  Somebody might want to compare entire controller registers in a raw
binary format to check controller status or some of configurations.  It
also can be needed to print out JSON format for easily parsing.

This patch introduces JSON and RAW_BINARY print format with a general
--output-format argument.  This will have "normal" value by default, and
also support "json" and "binary".

We don't care about whether the given "fabrics" argument in
json_ctrl_registers() because all the reserved registers and fields are
to be returned as 0x0 as specified in NVMe-oF "Property Definitions"
section.

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