Skip to contentSkip to conversation

nvme: print I/O error to stderr

PATCH New Sagi Grimberg 2 participants 2 messages Mar 6, 2019 NVMe

lore
Share & tools
lore

Sagi Grimberg

author maintainer
#0 lore raw

PATCH 1/1 nvme: print I/O error to stderr

something like blktests might rely on this to output to stderr.

Signed-off-by Sagi Grimberg <sagi at grimberg.me>
---
 nvme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
nvme.c +1 -1
index 8aac2ef1f673..e88d19940df5 100644
@@ -4413,7 +4413,7 @@ static int submit_io(int opcode, char *command, const char *desc,
 	if (err < 0)
 		perror("submit-io");
 	else if (err)
-		printf("%s:%s(%04x)\n", command, nvme_status_to_string(err), err);
+		fprintf(stderr, "%s:%s(%04x)\n", command, nvme_status_to_string(err), err);
 	else {
 		if (!(opcode & 1) && write(dfd, (void *)buffer, cfg.data_size) < 0) {
 			fprintf(stderr, "write: %s: failed to write buffer to output file\n",
Signature · 1 line
2.17.1
Applied
#1 lore raw

PATCH 1/1 nvme: print I/O error to stderr

Applied, thank you.