From 06eddcbd19df425e88a5faf5a49f07dfeeaec535 Mon Sep 17 00:00:00 2001 From: Martin George Date: Sun, 17 Nov 2024 14:10:13 +0530 Subject: [PATCH] nvme: update messages for few misc functions Print a helpful success message (under verbose option) for few functions like subsystem_reset(), reset() and ns_rescan(). Signed-off-by: Martin George --- nvme.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nvme.c b/nvme.c index ea0590f0a..91431ef51 100644 --- a/nvme.c +++ b/nvme.c @@ -5125,7 +5125,8 @@ static int subsystem_reset(int argc, char **argv, struct command *cmd, struct pl nvme_show_error("Subsystem-reset: NVM Subsystem Reset not supported."); else nvme_show_error("Subsystem-reset: %s", nvme_strerror(errno)); - } + } else if (argconfig_parse_seen(opts, "verbose")) + printf("resetting subsystem through %s\n", dev->name); return err; } @@ -5146,6 +5147,8 @@ static int reset(int argc, char **argv, struct command *cmd, struct plugin *plug err = nvme_ctrl_reset(dev_fd(dev)); if (err < 0) nvme_show_error("Reset: %s", nvme_strerror(errno)); + else if (argconfig_parse_seen(opts, "verbose")) + printf("resetting controller %s\n", dev->name); return err; } @@ -5166,6 +5169,8 @@ static int ns_rescan(int argc, char **argv, struct command *cmd, struct plugin * err = nvme_ns_rescan(dev_fd(dev)); if (err < 0) nvme_show_error("Namespace Rescan: %s\n", nvme_strerror(errno)); + else if (argconfig_parse_seen(opts, "verbose")) + printf("rescanning namespaces through %s\n", dev->name); return err; }