Skip to content

Commit

Permalink
nvme: update messages for few misc functions
Browse files Browse the repository at this point in the history
Print a helpful success message (under verbose option) for few
functions like subsystem_reset(), reset() and ns_rescan().

Signed-off-by: Martin George <[email protected]>
  • Loading branch information
martin-gpy authored and igaw committed Nov 21, 2024
1 parent bc3e7c6 commit 06eddcb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 06eddcb

Please sign in to comment.