diff options
Diffstat (limited to '')
-rw-r--r-- | plugins/shannon/shannon-nvme.c | 6 | ||||
-rw-r--r-- | plugins/shannon/shannon-nvme.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/shannon/shannon-nvme.c b/plugins/shannon/shannon-nvme.c index d79b119..220638f 100644 --- a/plugins/shannon/shannon-nvme.c +++ b/plugins/shannon/shannon-nvme.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later #include <fcntl.h> #include <errno.h> #include <stdio.h> @@ -137,6 +138,8 @@ static int get_additional_smart_log(int argc, char **argv, struct command *cmd, }; fd = parse_and_open(argc, argv, desc, opts); + if (fd < 0) + return fd; err = nvme_get_nsid_log(fd, false, 0xca, cfg.namespace_id, sizeof(smart_log), &smart_log); if (!err) { @@ -147,6 +150,7 @@ static int get_additional_smart_log(int argc, char **argv, struct command *cmd, } else if (err > 0) nvme_show_status(err); + close(fd); return err; } @@ -156,7 +160,7 @@ static int get_additional_feature(int argc, char **argv, struct command *cmd, st "specified controller. Operating parameters are grouped "\ "and identified by Feature Identifiers; each Feature "\ "Identifier contains one or more attributes that may affect "\ - "behaviour of the feature. Each Feature has three possible "\ + "behavior of the feature. Each Feature has three possible "\ "settings: default, saveable, and current. If a Feature is "\ "saveable, it may be modified by set-feature. Default values "\ "are vendor-specific and not changeable. Use set-feature to "\ diff --git a/plugins/shannon/shannon-nvme.h b/plugins/shannon/shannon-nvme.h index 46fc697..255bb6b 100644 --- a/plugins/shannon/shannon-nvme.h +++ b/plugins/shannon/shannon-nvme.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ #undef CMD_INC_FILE #define CMD_INC_FILE plugins/shannon/shannon-nvme |