Skip to content

redo command API #29

@igaw

Description

@igaw

After the nvme-experiments/libnvme#59 tasks, the nvme-cli side needs to be updated.

For example for nvme_set_property the callsites needs to updated like this here:

@@ -149,26 +149,20 @@ static void test_set_property(void)
 {
        __u64 value = 0xffffffff;
        __u32 result;
-       struct nvme_set_property_args args = {
-               .value = value,
-               .result = &result,
-               .args_size = sizeof(args),
-               .offset = NVME_REG_BPMBL,
-       };
-
+       struct nvme_passthru_cmd cmd;
        int err;

        set_mock_admin_cmds(&mock_admin_cmd, 1);
-       err = nvme_set_property(test_hdl, &args);
+       nvme_init_set_property(&cmd, NVME_REG_BPMBL, value);
+       err = nvme_submit_admin_passthru(test_hdl, &cmd, &result);
        end_mock_cmds();
        check(err == 0, "returned error %d", err);
        check(result == 0, "returned result %u", result);

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions