Skip to content

Commit 696f985

Browse files
committed
Revert "nvme: add flush command chardev handle error message"
This reverts commit 946029c. Causes regression in nightly CI runs. The problem couldn't be figured out thus revert it. Signed-off-by: Daniel Wagner <[email protected]>
1 parent 4053eff commit 696f985

1 file changed

Lines changed: 4 additions & 19 deletions

File tree

nvme.c

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7465,23 +7465,6 @@ static int copy_cmd(int argc, char **argv, struct command *cmd, struct plugin *p
74657465
return err;
74667466
}
74677467

7468-
static void io_cmd_show_error(struct nvme_dev *dev, int err, const char *cmd)
7469-
{
7470-
if (err > 0) {
7471-
nvme_show_status(err);
7472-
return;
7473-
}
7474-
7475-
nvme_show_init();
7476-
7477-
nvme_show_error("%s: %s", cmd, nvme_strerror(errno));
7478-
7479-
if (is_chardev(dev))
7480-
nvme_show_result("char device provided but blkdev is needed, e.g. /dev/nvme0n1");
7481-
7482-
nvme_show_finish();
7483-
}
7484-
74857468
static int flush_cmd(int argc, char **argv, struct command *cmd, struct plugin *plugin)
74867469
{
74877470
const char *desc = "Commit data and metadata associated with\n"
@@ -7517,8 +7500,10 @@ static int flush_cmd(int argc, char **argv, struct command *cmd, struct plugin *
75177500
}
75187501

75197502
err = nvme_flush(dev_fd(dev), cfg.namespace_id);
7520-
if (err)
7521-
io_cmd_show_error(dev, err, "flush");
7503+
if (err < 0)
7504+
nvme_show_error("flush: %s", nvme_strerror(errno));
7505+
else if (err != 0)
7506+
nvme_show_status(err);
75227507
else
75237508
printf("NVMe Flush: success\n");
75247509

0 commit comments

Comments
 (0)