From b6f046a440df2dfe4992006ea41fa85f79ffad62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E7=8E=AE=E6=96=87?= Date: Sun, 16 Nov 2025 12:14:55 +0800 Subject: [PATCH] nvme: fix virtual_mgmt cntlid parsing order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `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: 胡玮文 --- nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvme.c b/nvme.c index 78e3c83559..47068a2770 100644 --- a/nvme.c +++ b/nvme.c @@ -4358,7 +4358,7 @@ static int virtual_mgmt(int argc, char **argv, struct command *acmd, struct plug }; NVME_ARGS(opts, - OPT_UINT("cntlid", 'c', &cfg.cntlid, cntlid), + OPT_SHRT("cntlid", 'c', &cfg.cntlid, cntlid), OPT_BYTE("rt", 'r', &cfg.rt, rt), OPT_BYTE("act", 'a', &cfg.act, act), OPT_SHRT("nr", 'n', &cfg.nr, nr));