Skip to content

Commit f8e0cad

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

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

nvme.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5995,16 +5995,11 @@ static int get_register(int argc, char **argv, struct command *acmd, struct plug
59955995

59965996
static int nvme_set_single_property(struct nvme_transport_handle *hdl, int offset, uint64_t value)
59975997
{
5998-
struct nvme_set_property_args args = {
5999-
.args_size = sizeof(args),
6000-
.offset = offset,
6001-
.value = value,
6002-
.timeout = nvme_cfg.timeout,
6003-
.result = NULL,
6004-
};
5998+
struct nvme_passthru_cmd cmd;
60055999
int err;
60066000

6007-
err = nvme_set_property(hdl, &args);
6001+
nvme_init_set_property(&cmd, offset, value);
6002+
err = nvme_submit_admin_passthru(hdl, &cmd, NULL);
60086003
if (err < 0)
60096004
nvme_show_error("set-property: %s", nvme_strerror(-err));
60106005
else if (!err)

0 commit comments

Comments
 (0)