]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-print: fix argument order for show functions
authorCaleb Sander <csander@purestorage.com>
Thu, 6 Jul 2023 23:20:57 +0000 (17:20 -0600)
committerDaniel Wagner <wagi@monom.org>
Mon, 10 Jul 2023 07:55:40 +0000 (09:55 +0200)
nvme_show_ana_log() and nvme_show_boot_part_log() are being called
with their "length" and "flags" arguments swapped.
Fix this so their output is displayed correctly.

Fixes #1994

Fixes: 62a0ce1 ("nvme-print: Unify flag passing into functions")
Fixes: 079afcd ("nvme: add boot partition log support")
Signed-off-by: Caleb Sander <csander@purestorage.com>
nvme.c

diff --git a/nvme.c b/nvme.c
index b5b058573b98add95d629827fe0fed57a91d6de6..ee38ba76c7e27696bd6ef17a9d74c02681b41297 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -619,7 +619,7 @@ static int get_ana_log(int argc, char **argv, struct command *cmd,
 
        err = nvme_cli_get_log_ana(dev, lsp, true, 0, ana_log_len, ana_log);
        if (!err)
-               nvme_show_ana_log(ana_log, dev->name, flags, ana_log_len);
+               nvme_show_ana_log(ana_log, dev->name, ana_log_len, flags);
        else if (err > 0)
                nvme_show_status(err);
        else
@@ -1900,7 +1900,7 @@ static int get_boot_part_log(int argc, char **argv, struct command *cmd, struct
                                              sizeof(boot) + bpsz,
                                              (struct nvme_boot_partition *)bp_log);
        if (!err)
-               nvme_show_boot_part_log(&bp_log, dev->name, flags, sizeof(boot) + bpsz);
+               nvme_show_boot_part_log(&bp_log, dev->name, sizeof(boot) + bpsz, flags);
        else if (err > 0)
                nvme_show_status(err);
        else