diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 22:38:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-06-30 22:38:48 +0000 |
commit | 01c4d3d32c5044d3d17055c2d94d40fee9d130e1 (patch) | |
tree | 2c213cd5436bff644fa7023b94674a9c12d2e1af /plugins/amzn | |
parent | Adding upstream version 2.4+really2.4. (diff) | |
download | nvme-cli-01c4d3d32c5044d3d17055c2d94d40fee9d130e1.tar.xz nvme-cli-01c4d3d32c5044d3d17055c2d94d40fee9d130e1.zip |
Adding upstream version 2.5.upstream/2.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/amzn')
-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); |