Skip to content

Commit 3d74924

Browse files
martin-gpyigaw
authored andcommitted
nvme: make -v output consistent with -H output for nvme get-property
Current -v verbose output of the nvme get-property command is a no-op. So update it to make it consistent with the -H human-readable output for this same command. Signed-off-by: Martin George <[email protected]>
1 parent dc2c1fa commit 3d74924

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

nvme.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6107,6 +6107,7 @@ static int get_property(int argc, char **argv, struct command *cmd, struct plugi
61076107
_cleanup_nvme_dev_ struct nvme_dev *dev = NULL;
61086108
__u64 value;
61096109
int err;
6110+
nvme_print_flags_t flags = NORMAL;
61106111

61116112
struct get_reg_config cfg = {
61126113
.offset = -1,
@@ -6127,9 +6128,12 @@ static int get_property(int argc, char **argv, struct command *cmd, struct plugi
61276128
return -EINVAL;
61286129
}
61296130

6131+
if (cfg.human_readable || argconfig_parse_seen(opts, "verbose"))
6132+
flags |= VERBOSE;
6133+
61306134
err = nvme_get_single_property(dev_fd(dev), &cfg, &value);
61316135
if (!err)
6132-
nvme_show_single_property(cfg.offset, value, cfg.human_readable);
6136+
nvme_show_single_property(cfg.offset, value, flags);
61336137

61346138
return err;
61356139
}

0 commit comments

Comments
 (0)