]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
fix virtual mgmt parameter sizes
authorKeith Busch <kbusch@kernel.org>
Fri, 21 May 2021 16:57:36 +0000 (09:57 -0700)
committerKeith Busch <kbusch@kernel.org>
Fri, 21 May 2021 16:57:36 +0000 (09:57 -0700)
The option sizes need to match the parameter sizes.

Fixes: 4221cb85 ("nvme: fix and refactor virt mgmt cdw10 and cdw11 arguments")
Link: https://github.com/linux-nvme/nvme-cli/issues/1049
Signed-off-by: Keith Busch <kbusch@kernel.org>
nvme.c

diff --git a/nvme.c b/nvme.c
index c30fad873dcfb8487e3ccc86d8d6bc7b35c532b4..b61c4215ab36e5115f643b3de10ebd8e800d0b3e 100644 (file)
--- a/nvme.c
+++ b/nvme.c
@@ -2395,9 +2395,9 @@ static int virtual_mgmt(int argc, char **argv, struct command *cmd, struct plugi
 
        OPT_ARGS(opts) = {
                OPT_UINT("cntlid", 'c', &cfg.cntlid, cntlid),
-               OPT_UINT("rt",     'r', &cfg.rt,     rt),
-               OPT_UINT("act",    'a', &cfg.act,    act),
-               OPT_UINT("nr",     'n', &cfg.nr,     nr),
+               OPT_BYTE("rt",     'r', &cfg.rt,     rt),
+               OPT_BYTE("act",    'a', &cfg.act,    act),
+               OPT_SHRT("nr",     'n', &cfg.nr,     nr),
                OPT_END()
        };