From 0303ac18805cbfe6427c9b8bc005babb807b337f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matias=20Bj=C3=B8rling?= Date: Tue, 23 Jun 2020 14:00:14 +0000 Subject: [PATCH] Add support for printing vs area in zns id ns MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Matias Bjørling --- plugins/zns/zns.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/zns/zns.c b/plugins/zns/zns.c index 7a6da79c..c75b7c53 100644 --- a/plugins/zns/zns.c +++ b/plugins/zns/zns.c @@ -62,6 +62,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug const char *desc = "Send an ZNS specific Identify Namespace command to "\ "the given device and report information about the specified "\ "namespace in varios formats."; + const char *vendor_specific = "dump binary vendor fields"; const char *human_readable = "show identify in readable format"; enum nvme_print_flags flags; @@ -73,6 +74,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug char *output_format; __u32 namespace_id; int human_readable; + int vendor_specific; }; struct config cfg = { @@ -81,6 +83,7 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug OPT_ARGS(opts) = { OPT_UINT("namespace-id", 'n', &cfg.namespace_id, namespace_id), + OPT_FLAG("vendor-specific", 'v', &cfg.vendor_specific, vendor_specific), OPT_FMT("output-format", 'o', &cfg.output_format, output_format), OPT_FLAG("human-readable", 'H', &cfg.human_readable, human_readable), OPT_END() @@ -93,6 +96,8 @@ static int id_ns(int argc, char **argv, struct command *cmd, struct plugin *plug flags = validate_output_format(cfg.output_format); if (flags < 0) goto close_fd; + if (cfg.vendor_specific) + flags |= VS; if (cfg.human_readable) flags |= VERBOSE; -- 2.50.1