Skip to content

Commit 15c1805

Browse files
ikegami-tigaw
authored andcommitted
nvme: fix to add device open error message
Since previously the message output. Signed-off-by: Tokunori Ikegami <[email protected]>
1 parent e3fed74 commit 15c1805

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
@@ -357,7 +357,9 @@ static int get_transport_handle(struct nvme_global_ctx *ctx, int argc,
357357
devname = argv[optind];
358358

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

363365
return ret;

0 commit comments

Comments
 (0)