]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme-print: Use attrs_info as key for Zone Attributes Information
authorsunxing <sunxing0210@qq.com>
Sat, 4 Feb 2023 09:00:43 +0000 (17:00 +0800)
committerDaniel Wagner <dwagner@suse.de>
Mon, 6 Feb 2023 09:02:14 +0000 (10:02 +0100)
The JSON output uses the key 'attrs' for both 'za' and 'zai' members.
Fix this by using 'attrs_info' for the 'zai'.

[dwagner: updated commit messages]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme-print.c

index cabce68cd21b0443011183631dd90ab1a33823d8..bc873c113c9957b25b558703307430da68d8a652 100644 (file)
@@ -5574,7 +5574,7 @@ static void json_nvme_zns_report_zones(void *report, __u32 descs,
                json_object_add_value_string(zone, "type",
                        zone_type_to_string(desc->zt));
                json_object_add_value_uint(zone, "attrs", desc->za);
-               json_object_add_value_uint(zone, "attrs", desc->zai);
+               json_object_add_value_uint(zone, "attrs_info", desc->zai);
 
                if (ext_size) {
                        if (desc->za & NVME_ZNS_ZA_ZDEV) {