summaryrefslogtreecommitdiffstats
path: root/plugins/fdp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-07 12:43:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-04-07 12:43:34 +0000
commit8e1dcd44fcad7826e5f8fa6c5caa6c23989518d9 (patch)
tree8a5e1e9d02b2562d57d57ef88e26d4778ebeeab3 /plugins/fdp
parentReleasing debian version 2.4+really2.3-2. (diff)
downloadnvme-cli-8e1dcd44fcad7826e5f8fa6c5caa6c23989518d9.tar.xz
nvme-cli-8e1dcd44fcad7826e5f8fa6c5caa6c23989518d9.zip
Merging upstream version 2.4+really2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/fdp')
-rw-r--r--plugins/fdp/fdp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/fdp/fdp.c b/plugins/fdp/fdp.c
index 9fef271..1e292e8 100644
--- a/plugins/fdp/fdp.c
+++ b/plugins/fdp/fdp.c
@@ -350,7 +350,8 @@ static int fdp_status(int argc, char **argv, struct command *cmd, struct plugin
goto out;
}
- len = le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc);
+ len = sizeof(struct nvme_fdp_ruh_status) +
+ le16_to_cpu(hdr.nruhsd) * sizeof(struct nvme_fdp_ruh_status_desc);
buf = malloc(len);
if (!buf) {
err = -ENOMEM;