The struct nvme_global_ctx is available everywhere (if not add it to the fucntion).
Use it replace the printf/fprintf error logging:
err = nvme_submit_admin_passthru(hdl, &cmd);
if (err) {
fprintf(stderr, "ERROR: nvme_identify_ctrl() failed 0x%x\n", err);
return err;
}
The struct nvme_global_ctx is available everywhere (if not add it to the fucntion).
Use it replace the printf/fprintf error logging: