Skip to content

Commit da51887

Browse files
guoguojennaigaw
authored andcommitted
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 <zguo@redhat.com>
1 parent 890ed95 commit da51887

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2631,7 +2631,7 @@ static int list_ctrl(int argc, char **argv, struct command *cmd, struct plugin *
26312631
return err;
26322632

26332633
err = validate_output_format(nvme_cfg.output_format, &flags);
2634-
if (err < 0) {
2634+
if (err < 0 || (flags != JSON && flags != NORMAL)) {
26352635
nvme_show_error("Invalid output format");
26362636
return err;
26372637
}

0 commit comments

Comments
 (0)