Skip to content

Commit eeadb2e

Browse files
kurz-migaw
authored andcommitted
src: rework nvme_lockdown command
libnvme changed the API for the nvme_lockdown command. Update the callsite accordingly. Signed-off-by: Markus Kurz <[email protected]>
1 parent b0f2040 commit eeadb2e

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

nvme.c

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8930,6 +8930,7 @@ static int lockdown_cmd(int argc, char **argv, struct command *acmd, struct plug
89308930

89318931
_cleanup_nvme_global_ctx_ struct nvme_global_ctx *ctx = NULL;
89328932
_cleanup_nvme_transport_handle_ struct nvme_transport_handle *hdl = NULL;
8933+
struct nvme_passthru_cmd cmd;
89338934
int err = -1;
89348935

89358936
struct config {
@@ -8977,17 +8978,9 @@ static int lockdown_cmd(int argc, char **argv, struct command *acmd, struct plug
89778978
return -1;
89788979
}
89798980

8980-
struct nvme_lockdown_args args = {
8981-
.args_size = sizeof(args),
8982-
.scp = cfg.scp,
8983-
.prhbt = cfg.prhbt,
8984-
.ifc = cfg.ifc,
8985-
.ofi = cfg.ofi,
8986-
.uuidx = cfg.uuid,
8987-
.timeout = nvme_cfg.timeout,
8988-
.result = NULL,
8989-
};
8990-
err = nvme_lockdown(hdl, &args);
8981+
nvme_init_lockdown(&cmd, cfg.scp, cfg.prhbt, cfg.ifc, cfg.ofi,
8982+
cfg.uuid);
8983+
err = nvme_submit_admin_passthru(hdl, &cmd, NULL);
89918984
if (err < 0)
89928985
nvme_show_error("lockdown: %s", nvme_strerror(-err));
89938986
else if (err > 0)

0 commit comments

Comments
 (0)