nbd: fix JSON config dump

We need to use arrays here.

Change-Id: Ibca72f9780b057fd4349ee0d4daa1322779efc88
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/409026
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Pawel Wodkowski 2018-04-25 19:04:39 +02:00 committed by Daniel Verkamp
parent d69ccc823a
commit 629405ddfe

View File

@ -217,6 +217,8 @@ spdk_nbd_write_config_json(struct spdk_json_write_ctx *w, struct spdk_event *don
{
struct spdk_nbd_disk *nbd;
spdk_json_write_array_begin(w);
TAILQ_FOREACH(nbd, &g_spdk_nbd.disk_head, tailq) {
spdk_json_write_object_begin(w);
@ -230,6 +232,7 @@ spdk_nbd_write_config_json(struct spdk_json_write_ctx *w, struct spdk_event *don
spdk_json_write_object_end(w);
}
spdk_json_write_array_end(w);
spdk_event_call(done_ev);
}