summaryrefslogtreecommitdiffstats
path: root/plugins/netapp/netapp-nvme.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-02 20:49:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-02 20:49:35 +0000
commitf2c543b4ccad3b9f8871d952cddf66b3b438595b (patch)
treec3c363d1cc72514221685c42a79a19b320114acc /plugins/netapp/netapp-nvme.c
parentAdding debian version 1.12-8. (diff)
downloadnvme-cli-f2c543b4ccad3b9f8871d952cddf66b3b438595b.tar.xz
nvme-cli-f2c543b4ccad3b9f8871d952cddf66b3b438595b.zip
Merging upstream version 1.14.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'plugins/netapp/netapp-nvme.c')
-rw-r--r--plugins/netapp/netapp-nvme.c13
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++) {