Skip to content

Commit ac47e9b

Browse files
committed
nvme: fix to add device open error message
Since previously the message output. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent a57c1b3 commit ac47e9b

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nvme.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,9 @@ static int get_transport_handle(struct nvme_global_ctx *ctx, int argc,
356356
devname = argv[optind];
357357

358358
ret = nvme_open(ctx, devname, hdl);
359-
if (!ret && log_level >= LOG_DEBUG)
359+
if (ret)
360+
nvme_show_err(devname, ret);
361+
else if (log_level >= LOG_DEBUG)
360362
nvme_show_init();
361363

362364
return ret;

0 commit comments

Comments
 (0)