Skip to content

Commit 0b53ec8

Browse files
committed
nvme: use correct parser type for nvmsetid and endgid option
nvmsetid and endgid are both shorts, thus the OPT_SHRT parser type needs to be used. Otherwise the result is written to the wrong memory location. Fixes: 972effd ("nvme.c: create-ns arguments are added") Signed-off-by: Daniel Wagner <[email protected]>
1 parent 48ff213 commit 0b53ec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nvme.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3191,8 +3191,8 @@ static int create_ns(int argc, char **argv, struct command *cmd, struct plugin *
31913191
OPT_BYTE("dps", 'd', &cfg.dps, dps),
31923192
OPT_BYTE("nmic", 'm', &cfg.nmic, nmic),
31933193
OPT_UINT("anagrp-id", 'a', &cfg.anagrpid, anagrpid),
3194-
OPT_UINT("nvmset-id", 'i', &cfg.nvmsetid, nvmsetid),
3195-
OPT_UINT("endg-id", 'e', &cfg.endgid, endgid),
3194+
OPT_SHRT("nvmset-id", 'i', &cfg.nvmsetid, nvmsetid),
3195+
OPT_SHRT("endg-id", 'e', &cfg.endgid, endgid),
31963196
OPT_SUFFIX("block-size", 'b', &cfg.bs, bs),
31973197
OPT_BYTE("csi", 'y', &cfg.csi, csi),
31983198
OPT_SUFFIX("lbstm", 'l', &cfg.lbstm, lbstm),

0 commit comments

Comments
 (0)