diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:18:07 +0000 |
commit | 2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891 (patch) | |
tree | 82f2949088d2502e947b83ba9973de54f9bf4402 /plugins/shannon | |
parent | Releasing debian version 2.0-1. (diff) | |
download | nvme-cli-2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891.tar.xz nvme-cli-2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891.zip |
Merging upstream version 2.1~rc0 (Closes: #1015722).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/shannon')
-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 |