From 4bc9eebc3203138c017881db28c898ba83248ba3 Mon Sep 17 00:00:00 2001 From: zguo Date: Mon, 30 Jun 2025 11:22:08 +0800 Subject: [PATCH] list-ctrl: limit to JSON and normal output Binary format is not implemented for list-ctrl, so limit output to normal and json formats only. Signed-off-by: zguo --- nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvme.c b/nvme.c index 5992335418..b8358901c1 100644 --- a/nvme.c +++ b/nvme.c @@ -2629,7 +2629,7 @@ static int list_ctrl(int argc, char **argv, struct command *cmd, struct plugin * return err; err = validate_output_format(nvme_cfg.output_format, &flags); - if (err < 0) { + if (err < 0 || (flags != JSON && flags != NORMAL)) { nvme_show_error("Invalid output format"); return err; }