Skip to content

Commit 91cc3ee

Browse files
huww98igaw
authored andcommitted
nvme: fix virtual_mgmt cntlid parsing order
`cntlid` is declared as u16 but parsed as u32, overwriting the rt and act field after it. Currently we can only specify cntlid before rt and act. We remove this restriction now. Signed-off-by: 胡玮文 <[email protected]>
1 parent 7eb5a7f commit 91cc3ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nvme.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4358,7 +4358,7 @@ static int virtual_mgmt(int argc, char **argv, struct command *acmd, struct plug
43584358
};
43594359

43604360
NVME_ARGS(opts,
4361-
OPT_UINT("cntlid", 'c', &cfg.cntlid, cntlid),
4361+
OPT_SHRT("cntlid", 'c', &cfg.cntlid, cntlid),
43624362
OPT_BYTE("rt", 'r', &cfg.rt, rt),
43634363
OPT_BYTE("act", 'a', &cfg.act, act),
43644364
OPT_SHRT("nr", 'n', &cfg.nr, nr));

0 commit comments

Comments
 (0)