diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2022-07-26 05:11:33 +0000 |
commit | a751023422eadf87cd8d6484878193a4914a9d85 (patch) | |
tree | 3fca0ae6325173fc2583e7d88abe4c38e6193277 /plugins/ocp | |
parent | Adding upstream version 2.0. (diff) | |
download | nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.tar.xz nvme-cli-a751023422eadf87cd8d6484878193a4914a9d85.zip |
Adding upstream version 2.1~rc0.upstream/2.1_rc0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/ocp')
-rw-r--r-- | plugins/ocp/ocp-nvme.c | 18 | ||||
-rw-r--r-- | plugins/ocp/ocp-nvme.h | 2 |
2 files changed, 4 insertions, 16 deletions
diff --git a/plugins/ocp/ocp-nvme.c b/plugins/ocp/ocp-nvme.c index 6b7fc9d..56cfdff 100644 --- a/plugins/ocp/ocp-nvme.c +++ b/plugins/ocp/ocp-nvme.c @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0-only +// SPDX-License-Identifier: GPL-2.0-or-later /* Copyright (c) 2022 Meta Platforms, Inc. * * Authors: Arthur Shau <arthurshau@fb.com>, @@ -380,11 +380,6 @@ static int get_c0_log_page(int fd, char *format) } /* print the data */ - if (!data) { - fprintf(stderr, "ERROR : OCP : Invalid buffer to read 0xC0 log\n"); - ret = -1; - goto out; - } switch (fmt) { case NORMAL: ocp_print_C0_log_normal(data); @@ -430,7 +425,7 @@ static int ocp_smart_add_log(int argc, char **argv, struct command *cmd, if (ret) fprintf(stderr, "ERROR : OCP : Failure reading the C0 Log Page, ret = %d\n", ret); - + close(fd); return ret; } @@ -728,13 +723,6 @@ static int get_c3_log_page(int fd, char *format) } } - /* print the data */ - if (!log_data) { - fprintf(stderr, - "ERROR : OCP : Invalid C3 log data buffer\n"); - ret = -1; - goto out; - } switch (fmt) { case NORMAL: ocp_print_C3_log_normal(fd, log_data); @@ -783,6 +771,6 @@ static int ocp_latency_monitor_log(int argc, char **argv, struct command *comman fprintf(stderr, "ERROR : OCP : Failure reading the C3 Log Page, ret = %d\n", ret); - + close(fd); return ret; } diff --git a/plugins/ocp/ocp-nvme.h b/plugins/ocp/ocp-nvme.h index 19378cd..3e3f437 100644 --- a/plugins/ocp/ocp-nvme.h +++ b/plugins/ocp/ocp-nvme.h @@ -1,4 +1,4 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ +/* SPDX-License-Identifier: GPL-2.0-or-later */ /* Copyright (c) 2022 Meta Platforms, Inc. * * Authors: Arthur Shau <arthurshau@fb.com>, |