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
15 changes: 11 additions & 4 deletions plugins/ocp/ocp-nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,23 +1333,30 @@

ret = ocp_get_log_simple(hdl, OCP_LID_TELSLG, total_log_page_sz, pC9_string_buffer);
} else {
fprintf(stderr, "ERROR : OCP : Unable to read C9 data.\n");
fprintf(stderr, "ERROR : OCP : Unable to read C9 data, ret: %d.\n", ret);

Check failure on line 1336 in plugins/ocp/ocp-nvme.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 89 exceeds 80 columns
return ret;
}

if (save_bin) {
fd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC, 0666);
if (fd < 0) {
fprintf(stderr, "Failed to open output file %s: %s!\n", output_file,
nvme_strerror(errno));
return fd;
ret = fd;
goto free;
}

ret = write(fd, (void *)pC9_string_buffer, total_log_page_sz);
if (ret != total_log_page_sz)
fprintf(stderr, "Failed to flush all data to file!\n");
fprintf(stderr, "Failed to flush all data to file! ret: %d\n", ret);

Check failure on line 1351 in plugins/ocp/ocp-nvme.c

View workflow job for this annotation

GitHub Actions / checkpatch review

WARNING: line length of 92 exceeds 80 columns
else
/* all data written, set ret = SUCCESS */
ret = 0;
}

return 0;
free:
free(pC9_string_buffer);
return ret;
}

int parse_ocp_telemetry_log(struct ocp_telemetry_parse_options *options)
Expand Down