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>