Skip to content

introduce helper to handle return codes #98

@igaw

Description

@igaw

We have plenty of this code pattern which is adds a lot of repetative code. Introduce helper for this

	err = nvme_submit_admin_passthru(hdl, &cmd);
	if (err < 0)
		nvme_show_error("ERROR: nvme_lm_cdq() failed: %s", nvme_strerror(errno));
	else if (err > 0)
		nvme_show_status(err);
	else
		printf("Delete CDQ Successful: CDQID=0x%04x\n", cfg.cdqid);

Metadata

Metadata

Assignees

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