const char *desc = "Send an Identify Primary Controller Capabilities "\
"command to the given device and report the information in a "\
"decoded format (default), json or binary.";
+ const char *human_readable = "show info in readable format";
struct nvme_primary_ctrl_caps caps;
int err, fd;
struct config {
char *output_format;
+ int human_readable;
};
struct config cfg = {
};
OPT_ARGS(opts) = {
- OPT_FMT("output-format", 'o', &cfg.output_format, output_format),
+ OPT_FMT("output-format", 'o', &cfg.output_format, output_format),
+ OPT_FLAG("human-readable", 'H', &cfg.human_readable, human_readable),
OPT_END()
};
err = flags = validate_output_format(cfg.output_format);
if (flags < 0)
goto close_fd;
+ if (cfg.human_readable)
+ flags |= VERBOSE;
err = nvme_identify_primary_ctrl_caps(fd, &caps);
if (!err)