summaryrefslogtreecommitdiffstats
path: root/plugins/solidigm/solidigm-garbage-collection.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-24 07:57:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-12-24 07:57:49 +0000
commitfc67d3ad9a2903cc33e5cdaedaad51dd86a42236 (patch)
tree4ef72536a965fe220e71aea78b76b6bbbac2ed59 /plugins/solidigm/solidigm-garbage-collection.c
parentAdding upstream version 2.5. (diff)
downloadnvme-cli-fc67d3ad9a2903cc33e5cdaedaad51dd86a42236.tar.xz
nvme-cli-fc67d3ad9a2903cc33e5cdaedaad51dd86a42236.zip
Adding upstream version 2.7.1.upstream/2.7.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/solidigm/solidigm-garbage-collection.c')
-rw-r--r--plugins/solidigm/solidigm-garbage-collection.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/solidigm/solidigm-garbage-collection.c b/plugins/solidigm/solidigm-garbage-collection.c
index b26d754..a37e9c5 100644
--- a/plugins/solidigm/solidigm-garbage-collection.c
+++ b/plugins/solidigm/solidigm-garbage-collection.c
@@ -68,6 +68,7 @@ static void vu_gc_log_show(struct garbage_control_collection_log *payload, const
int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *cmd, struct plugin *plugin)
{
const char *desc = "Get and parse Solidigm vendor specific garbage collection event log.";
+ enum nvme_print_flags flags;
struct nvme_dev *dev;
int err;
__u8 uuid_index;
@@ -89,9 +90,8 @@ int solidigm_get_garbage_collection_log(int argc, char **argv, struct command *c
if (err)
return err;
- enum nvme_print_flags flags = validate_output_format(cfg.output_format);
-
- if (flags == -EINVAL) {
+ err = validate_output_format(cfg.output_format, &flags);
+ if (err) {
fprintf(stderr, "Invalid output format '%s'\n", cfg.output_format);
dev_close(dev);
return -EINVAL;