]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: io dry-run command meant to be show command based on help
authorSteven Seungcheol Lee <sc108.lee@samsung.com>
Fri, 11 Feb 2022 07:23:17 +0000 (16:23 +0900)
committerSteven Seungcheol Lee <sc108.lee@samsung.com>
Fri, 11 Feb 2022 11:14:57 +0000 (20:14 +0900)
even if show-command arg is not given, it should show command

Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index cc48aea9753b4c1833f32cf9c1718e171537576a..edfb8b2cdf9cef514294a2c4492497c1d01dbc86 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -6266,7 +6266,7 @@ static int submit_io(int opcode, char *command, const char *desc,
                }
        }
 
-       if (cfg.show) {
+       if (cfg.show || cfg.dry_run) {
                printf("opcode       : %02x\n", opcode);
                printf("nsid         : %02x\n", cfg.namespace_id);
                printf("flags        : %02x\n", 0);
@@ -7180,7 +7180,7 @@ static int passthru(int argc, char **argv, bool admin,
                }
        }
 
-       if (cfg.show_command) {
+       if (cfg.show_command || cfg.dry_run) {
                printf("opcode       : %02x\n", cfg.opcode);
                printf("flags        : %02x\n", cfg.flags);
                printf("rsvd1        : %04x\n", cfg.rsvd);