From: Caleb Sander Date: Thu, 6 Jul 2023 23:20:57 +0000 (-0600) Subject: nvme-print: fix argument order for show functions X-Git-Tag: v2.6~82 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=a9a75dfe94ee11e1de514358378bd61cda241995;p=users%2Fsagi%2Fnvme-cli.git nvme-print: fix argument order for show functions 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 --- diff --git a/nvme.c b/nvme.c index b5b05857..ee38ba76 100644 --- 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