From cd7a9d288368b1b3518cb47183b5e0195f38f73c Mon Sep 17 00:00:00 2001 From: Tokunori Ikegami Date: Mon, 22 Jun 2026 01:58:16 +0900 Subject: [PATCH] feat: use command line args verbose setting to show feature This is to be consistent with the rest of the commands. Signed-off-by: Tokunori Ikegami --- plugins/feat/feat-nvme.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/feat/feat-nvme.c b/plugins/feat/feat-nvme.c index 9e39851670..782b0b307c 100644 --- a/plugins/feat/feat-nvme.c +++ b/plugins/feat/feat-nvme.c @@ -79,6 +79,7 @@ static int feat_get_nsid(struct libnvme_transport_handle *hdl, __u32 nsid, __u64 result; int err; __u32 len = 0; + nvme_print_flags_t flags = NORMAL; __cleanup_libnvme_free void *buf = NULL; @@ -98,9 +99,18 @@ static int feat_get_nsid(struct libnvme_transport_handle *hdl, __u32 nsid, return err; } + err = validate_output_format(nvme_args.output_format, &flags); + if (err < 0) { + nvme_show_error("Invalid output format"); + return err; + } + + if (nvme_args.verbose) + flags |= VERBOSE; + nvme_show_init(); - nvme_show_feature(fid, sel, result, buf, len, NORMAL); + nvme_show_feature(fid, sel, result, buf, len, flags); nvme_show_finish();