From 2e650c1f5f2f79e7db10dec5dcdd1cffcaf47891 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 26 Jul 2022 07:11:40 +0200 Subject: Merging upstream version 2.1~rc0 (Closes: #1015722). Signed-off-by: Daniel Baumann --- plugins/shannon/shannon-nvme.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugins/shannon/shannon-nvme.c') 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 #include #include @@ -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 "\ -- cgit v1.2.3