]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
ocp: fix for power-state argument checking
authorBrandon Paupore <brandon.paupore@wdc.com>
Thu, 14 Dec 2023 20:15:31 +0000 (14:15 -0600)
committerDaniel Wagner <wagi@monom.org>
Tue, 19 Mar 2024 09:10:00 +0000 (10:10 +0100)
Noticed this as part of supporting set-telemetry-profile, it seems that
the power-state option is not being detected properly. With this fix the
function is able to enter set_dssd_power_state when given the option or
its alias.

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
plugins/ocp/ocp-nvme.c

index 53ae0f40c4809647febb4a83c8823ba6932fefbb..d11656932cbb2b55cf7729a477c9eb24ed4937d2 100644 (file)
@@ -2143,7 +2143,7 @@ static int set_dssd_power_state_feature(int argc, char **argv, struct command *c
        if (err)
                return err;
 
-       if (argconfig_parse_seen(opts, "power state"))
+       if (argconfig_parse_seen(opts, "power-state"))
                err = set_dssd_power_state(dev, nsid, fid, cfg.power_state,
                                               cfg.save,
                                               !argconfig_parse_seen(opts, "no-uuid"));