Skip to content

Commit 2542994

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

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

plugins/lm/lm-nvme.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ static int lm_track_send(int argc, char **argv, struct command *acmd, struct plu
178178
const char *stop = "Equivalent to stop tracking with defaults";
179179

180180

181-
_cleanup_nvme_global_ctx_ struct nvme_global_ctx *ctx = NULL;
182181
_cleanup_nvme_transport_handle_ struct nvme_transport_handle *hdl = NULL;
182+
_cleanup_nvme_global_ctx_ struct nvme_global_ctx *ctx = NULL;
183+
struct nvme_passthru_cmd cmd;
183184
int err = -1;
184185

185186
struct config {
@@ -232,14 +233,8 @@ static int lm_track_send(int argc, char **argv, struct command *acmd, struct plu
232233
cfg.mos = NVME_SET(NVME_LM_LACT_STOP_LOGGING, LM_LACT);
233234
}
234235

235-
struct nvme_lm_track_send_args args = {
236-
.args_size = sizeof(args),
237-
.cdqid = cfg.cdqid,
238-
.sel = cfg.sel,
239-
.mos = cfg.mos,
240-
};
241-
242-
err = nvme_lm_track_send(hdl, &args);
236+
nvme_init_lm_track_send(&cmd, cfg.sel, cfg.mos, cfg.cdqid);
237+
err = nvme_submit_admin_passthru(hdl, &cmd, NULL);
243238
if (err < 0)
244239
nvme_show_error("ERROR: nvme_lm_track_send() failed %s", strerror(errno));
245240
else if (err)

0 commit comments

Comments
 (0)