diff options
Diffstat (limited to 'plugins/netapp')
-rw-r--r-- | plugins/netapp/netapp-nvme.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/plugins/netapp/netapp-nvme.c b/plugins/netapp/netapp-nvme.c index a942f57..15c3923 100644 --- a/plugins/netapp/netapp-nvme.c +++ b/plugins/netapp/netapp-nvme.c @@ -25,7 +25,6 @@ #include "nvme.h" #include "nvme-ioctl.h" -#include "json.h" #include "suffix.h" @@ -197,7 +196,7 @@ static void netapp_get_ontap_labels(char *vsname, char *nspath, vol_name, "/", ns_name); } -static void netapp_smdevice_json(struct json_array *devices, char *devname, +static void netapp_smdevice_json(struct json_object *devices, char *devname, char *arrayname, char *volname, int nsid, char *nguid, char *ctrl, char *astate, char *size, long long lba, long long nsze) @@ -219,7 +218,7 @@ static void netapp_smdevice_json(struct json_array *devices, char *devname, json_array_add_value_object(devices, device_attrs); } -static void netapp_ontapdevice_json(struct json_array *devices, char *devname, +static void netapp_ontapdevice_json(struct json_object *devices, char *devname, char *vsname, char *nspath, int nsid, char *uuid, char *size, long long lba, long long nsze) { @@ -241,7 +240,7 @@ static void netapp_ontapdevice_json(struct json_array *devices, char *devname, static void netapp_smdevices_print(struct smdevice_info *devices, int count, int format) { struct json_object *root = NULL; - struct json_array *json_devices = NULL; + struct json_object *json_devices = NULL; int i, slta; char array_label[ARRAY_LABEL_LEN / 2 + 1]; char volume_label[VOLUME_LABEL_LEN / 2 + 1]; @@ -266,7 +265,7 @@ static void netapp_smdevices_print(struct smdevice_info *devices, int count, int else if (format == NJSON) { /* prepare for json output */ root = json_create_object(); - json_devices = json_create_array(); + json_devices = json_create_object(); } for (i = 0; i < count; i++) { @@ -304,7 +303,7 @@ static void netapp_ontapdevices_print(struct ontapdevice_info *devices, int count, int format) { struct json_object *root = NULL; - struct json_array *json_devices = NULL; + struct json_object *json_devices = NULL; char vsname[ONTAP_LABEL_LEN] = " "; char nspath[ONTAP_NS_PATHLEN] = " "; long long lba; @@ -332,7 +331,7 @@ static void netapp_ontapdevices_print(struct ontapdevice_info *devices, } else if (format == NJSON) { /* prepare for json output */ root = json_create_object(); - json_devices = json_create_array(); + json_devices = json_create_object(); } for (i = 0; i < count; i++) { |