Skip to content

Commit

Permalink
nvme: Fix get-reg command to use cfg.offset to check if set
Browse files Browse the repository at this point in the history
Change to not use argconfig_parse_seen() instead.

Signed-off-by: Tokunori Ikegami <[email protected]>
  • Loading branch information
ikegami-t committed Feb 4, 2024
1 parent 18118fd commit 87b876f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -5507,7 +5507,7 @@ static int get_register(int argc, char **argv, struct command *cmd, struct plugi
if (err)
return err;

if (!argconfig_parse_seen(opts, "offset")) {
if (cfg.offset < 0) {
if (cfg.cap)
cfg.offset = NVME_REG_CAP;
else if (cfg.vs)
Expand Down

0 comments on commit 87b876f

Please sign in to comment.