Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions plugins/solidigm/solidigm-internal-logs.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,8 @@ static int ilog_dump_identify_page(struct nvme_transport_handle *hdl,
_cleanup_free_ char *filename = NULL;
int err;

err = nvme_identify(hdl, nsid, NVME_CSI_NVM, cns->id, buff, 0);
err = nvme_identify(hdl, nsid, NVME_CSI_NVM, cns->id, buff,
sizeof(data));
if (err)
return err;

Expand All @@ -524,7 +525,7 @@ static int ilog_ensure_dump_id_ctrl(struct nvme_transport_handle *hdl,
first = false;
err = ilog_dump_identify_page(hdl, ilog, &idctrl, 0);

if (!err)
if (err == 0)
ilog->count++;

return err;
Expand Down Expand Up @@ -815,6 +816,8 @@ static int ilog_dump_pel(struct nvme_transport_handle *hdl, struct ilog *ilog)
if (err)
return err;

ilog->count++;

err = log_save(&lp, ilog->cfg->out_dir, "log_pages", "lid_0x0d_lsp_0x00_lsi_0x0000.bin",
pevent_log_full, lp.buffer_size);

Expand Down Expand Up @@ -997,7 +1000,7 @@ int solidigm_get_internal_log(int argc, char **argv, struct command *acmd,
if (err > 0)
nvme_show_status(err);

} else if ((ilog.count > 1) || cfg.verbose)
} else if ((ilog.count > 0) || cfg.verbose)
printf("Total: %d log files in %s/%s\n", ilog.count, initial_folder, output_path);

return err;
Expand Down