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:
parent
d69ccc823a
commit
629405ddfe
@ -217,6 +217,8 @@ spdk_nbd_write_config_json(struct spdk_json_write_ctx *w, struct spdk_event *don
|
|||||||
{
|
{
|
||||||
struct spdk_nbd_disk *nbd;
|
struct spdk_nbd_disk *nbd;
|
||||||
|
|
||||||
|
spdk_json_write_array_begin(w);
|
||||||
|
|
||||||
TAILQ_FOREACH(nbd, &g_spdk_nbd.disk_head, tailq) {
|
TAILQ_FOREACH(nbd, &g_spdk_nbd.disk_head, tailq) {
|
||||||
spdk_json_write_object_begin(w);
|
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_object_end(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spdk_json_write_array_end(w);
|
||||||
spdk_event_call(done_ev);
|
spdk_event_call(done_ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user