diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 22:38:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 22:38:51 +0000 |
commit | 5d64e8a26388e2abbf6a6585d17392d6e944ae7b (patch) | |
tree | 4eae47918df5f83f14e05bede9c361237a7dc089 /plugins/amzn | |
parent | Releasing debian version 2.4+really2.4-3. (diff) | |
download | nvme-cli-5d64e8a26388e2abbf6a6585d17392d6e944ae7b.tar.xz nvme-cli-5d64e8a26388e2abbf6a6585d17392d6e944ae7b.zip |
Merging upstream version 2.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | plugins/amzn/amzn-nvme.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/amzn/amzn-nvme.c b/plugins/amzn/amzn-nvme.c index e04aa53..d359cc3 100644 --- a/plugins/amzn/amzn-nvme.c +++ b/plugins/amzn/amzn-nvme.c @@ -28,15 +28,15 @@ static void json_amzn_id_ctrl(struct nvme_vu_id_ctrl_field *id, static void amzn_id_ctrl(__u8 *vs, struct json_object *root) { - struct nvme_vu_id_ctrl_field* id = (struct nvme_vu_id_ctrl_field *)vs; + struct nvme_vu_id_ctrl_field *id = (struct nvme_vu_id_ctrl_field *)vs; char bdev[32] = { 0 }; int len = 0; + while (len < 31) { - if (id->bdev[++len] == ' ') { + if (id->bdev[++len] == ' ') break; - } } snprintf(bdev, len+1, "%s", id->bdev); |