Bug Summary

File:bin/debug/scan-build/qapi-visit.c
Location:line 2606, column 16
Description:Access to field 'has_irq' results in a dereference of a null pointer

Annotated Source Code

1/* THIS FILE IS AUTOMATICALLY GENERATED, DO NOT MODIFY */
2
3/*
4 * schema-defined QAPI visitor functions
5 *
6 * Copyright IBM, Corp. 2011
7 *
8 * Authors:
9 * Anthony Liguori <aliguori@us.ibm.com>
10 *
11 * This work is licensed under the terms of the GNU LGPL, version 2.1 or later.
12 * See the COPYING.LIB file in the top-level directory.
13 *
14 */
15
16#include "qemu-common.h"
17#include "qapi-visit.h"
18
19#ifndef QAPI_VISIT_BUILTIN_VISITOR_DEF_H
20#define QAPI_VISIT_BUILTIN_VISITOR_DEF_H
21
22
23void visit_type_strList(Visitor *m, strList ** obj, const char *name, Error **errp)
24{
25 GenericList *i, **prev = (GenericList **)obj;
26 Error *err = NULL((void*)0);
27
28 if (!error_is_set(errp)) {
29 visit_start_list(m, name, &err);
30 if (!err) {
31 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
32 strList *native_i = (strList *)i;
33 visit_type_str(m, &native_i->value, NULL((void*)0), &err);
34 }
35 error_propagate(errp, err);
36 err = NULL((void*)0);
37
38 /* Always call end_list if start_list succeeded. */
39 visit_end_list(m, &err);
40 }
41 error_propagate(errp, err);
42 }
43}
44
45void visit_type_intList(Visitor *m, intList ** obj, const char *name, Error **errp)
46{
47 GenericList *i, **prev = (GenericList **)obj;
48 Error *err = NULL((void*)0);
49
50 if (!error_is_set(errp)) {
51 visit_start_list(m, name, &err);
52 if (!err) {
53 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
54 intList *native_i = (intList *)i;
55 visit_type_int(m, &native_i->value, NULL((void*)0), &err);
56 }
57 error_propagate(errp, err);
58 err = NULL((void*)0);
59
60 /* Always call end_list if start_list succeeded. */
61 visit_end_list(m, &err);
62 }
63 error_propagate(errp, err);
64 }
65}
66
67void visit_type_numberList(Visitor *m, numberList ** obj, const char *name, Error **errp)
68{
69 GenericList *i, **prev = (GenericList **)obj;
70 Error *err = NULL((void*)0);
71
72 if (!error_is_set(errp)) {
73 visit_start_list(m, name, &err);
74 if (!err) {
75 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
76 numberList *native_i = (numberList *)i;
77 visit_type_number(m, &native_i->value, NULL((void*)0), &err);
78 }
79 error_propagate(errp, err);
80 err = NULL((void*)0);
81
82 /* Always call end_list if start_list succeeded. */
83 visit_end_list(m, &err);
84 }
85 error_propagate(errp, err);
86 }
87}
88
89void visit_type_boolList(Visitor *m, boolList ** obj, const char *name, Error **errp)
90{
91 GenericList *i, **prev = (GenericList **)obj;
92 Error *err = NULL((void*)0);
93
94 if (!error_is_set(errp)) {
95 visit_start_list(m, name, &err);
96 if (!err) {
97 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
98 boolList *native_i = (boolList *)i;
99 visit_type_bool(m, &native_i->value, NULL((void*)0), &err);
100 }
101 error_propagate(errp, err);
102 err = NULL((void*)0);
103
104 /* Always call end_list if start_list succeeded. */
105 visit_end_list(m, &err);
106 }
107 error_propagate(errp, err);
108 }
109}
110
111void visit_type_int8List(Visitor *m, int8List ** obj, const char *name, Error **errp)
112{
113 GenericList *i, **prev = (GenericList **)obj;
114 Error *err = NULL((void*)0);
115
116 if (!error_is_set(errp)) {
117 visit_start_list(m, name, &err);
118 if (!err) {
119 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
120 int8List *native_i = (int8List *)i;
121 visit_type_int8(m, &native_i->value, NULL((void*)0), &err);
122 }
123 error_propagate(errp, err);
124 err = NULL((void*)0);
125
126 /* Always call end_list if start_list succeeded. */
127 visit_end_list(m, &err);
128 }
129 error_propagate(errp, err);
130 }
131}
132
133void visit_type_int16List(Visitor *m, int16List ** obj, const char *name, Error **errp)
134{
135 GenericList *i, **prev = (GenericList **)obj;
136 Error *err = NULL((void*)0);
137
138 if (!error_is_set(errp)) {
139 visit_start_list(m, name, &err);
140 if (!err) {
141 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
142 int16List *native_i = (int16List *)i;
143 visit_type_int16(m, &native_i->value, NULL((void*)0), &err);
144 }
145 error_propagate(errp, err);
146 err = NULL((void*)0);
147
148 /* Always call end_list if start_list succeeded. */
149 visit_end_list(m, &err);
150 }
151 error_propagate(errp, err);
152 }
153}
154
155void visit_type_int32List(Visitor *m, int32List ** obj, const char *name, Error **errp)
156{
157 GenericList *i, **prev = (GenericList **)obj;
158 Error *err = NULL((void*)0);
159
160 if (!error_is_set(errp)) {
161 visit_start_list(m, name, &err);
162 if (!err) {
163 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
164 int32List *native_i = (int32List *)i;
165 visit_type_int32(m, &native_i->value, NULL((void*)0), &err);
166 }
167 error_propagate(errp, err);
168 err = NULL((void*)0);
169
170 /* Always call end_list if start_list succeeded. */
171 visit_end_list(m, &err);
172 }
173 error_propagate(errp, err);
174 }
175}
176
177void visit_type_int64List(Visitor *m, int64List ** obj, const char *name, Error **errp)
178{
179 GenericList *i, **prev = (GenericList **)obj;
180 Error *err = NULL((void*)0);
181
182 if (!error_is_set(errp)) {
183 visit_start_list(m, name, &err);
184 if (!err) {
185 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
186 int64List *native_i = (int64List *)i;
187 visit_type_int64(m, &native_i->value, NULL((void*)0), &err);
188 }
189 error_propagate(errp, err);
190 err = NULL((void*)0);
191
192 /* Always call end_list if start_list succeeded. */
193 visit_end_list(m, &err);
194 }
195 error_propagate(errp, err);
196 }
197}
198
199void visit_type_uint8List(Visitor *m, uint8List ** obj, const char *name, Error **errp)
200{
201 GenericList *i, **prev = (GenericList **)obj;
202 Error *err = NULL((void*)0);
203
204 if (!error_is_set(errp)) {
205 visit_start_list(m, name, &err);
206 if (!err) {
207 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
208 uint8List *native_i = (uint8List *)i;
209 visit_type_uint8(m, &native_i->value, NULL((void*)0), &err);
210 }
211 error_propagate(errp, err);
212 err = NULL((void*)0);
213
214 /* Always call end_list if start_list succeeded. */
215 visit_end_list(m, &err);
216 }
217 error_propagate(errp, err);
218 }
219}
220
221void visit_type_uint16List(Visitor *m, uint16List ** obj, const char *name, Error **errp)
222{
223 GenericList *i, **prev = (GenericList **)obj;
224 Error *err = NULL((void*)0);
225
226 if (!error_is_set(errp)) {
227 visit_start_list(m, name, &err);
228 if (!err) {
229 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
230 uint16List *native_i = (uint16List *)i;
231 visit_type_uint16(m, &native_i->value, NULL((void*)0), &err);
232 }
233 error_propagate(errp, err);
234 err = NULL((void*)0);
235
236 /* Always call end_list if start_list succeeded. */
237 visit_end_list(m, &err);
238 }
239 error_propagate(errp, err);
240 }
241}
242
243void visit_type_uint32List(Visitor *m, uint32List ** obj, const char *name, Error **errp)
244{
245 GenericList *i, **prev = (GenericList **)obj;
246 Error *err = NULL((void*)0);
247
248 if (!error_is_set(errp)) {
249 visit_start_list(m, name, &err);
250 if (!err) {
251 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
252 uint32List *native_i = (uint32List *)i;
253 visit_type_uint32(m, &native_i->value, NULL((void*)0), &err);
254 }
255 error_propagate(errp, err);
256 err = NULL((void*)0);
257
258 /* Always call end_list if start_list succeeded. */
259 visit_end_list(m, &err);
260 }
261 error_propagate(errp, err);
262 }
263}
264
265void visit_type_uint64List(Visitor *m, uint64List ** obj, const char *name, Error **errp)
266{
267 GenericList *i, **prev = (GenericList **)obj;
268 Error *err = NULL((void*)0);
269
270 if (!error_is_set(errp)) {
271 visit_start_list(m, name, &err);
272 if (!err) {
273 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
274 uint64List *native_i = (uint64List *)i;
275 visit_type_uint64(m, &native_i->value, NULL((void*)0), &err);
276 }
277 error_propagate(errp, err);
278 err = NULL((void*)0);
279
280 /* Always call end_list if start_list succeeded. */
281 visit_end_list(m, &err);
282 }
283 error_propagate(errp, err);
284 }
285}
286
287#endif /* QAPI_VISIT_BUILTIN_VISITOR_DEF_H */
288
289
290void visit_type_ErrorClassList(Visitor *m, ErrorClassList ** obj, const char *name, Error **errp)
291{
292 GenericList *i, **prev = (GenericList **)obj;
293 Error *err = NULL((void*)0);
294
295 if (!error_is_set(errp)) {
296 visit_start_list(m, name, &err);
297 if (!err) {
298 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
299 ErrorClassList *native_i = (ErrorClassList *)i;
300 visit_type_ErrorClass(m, &native_i->value, NULL((void*)0), &err);
301 }
302 error_propagate(errp, err);
303 err = NULL((void*)0);
304
305 /* Always call end_list if start_list succeeded. */
306 visit_end_list(m, &err);
307 }
308 error_propagate(errp, err);
309 }
310}
311
312void visit_type_ErrorClass(Visitor *m, ErrorClass * obj, const char *name, Error **errp)
313{
314 visit_type_enum(m, (int *)obj, ErrorClass_lookup, "ErrorClass", name, errp);
315}
316
317static void visit_type_NameInfo_fields(Visitor *m, NameInfo ** obj, Error **errp)
318{
319 Error *err = NULL((void*)0);
320 visit_start_optional(m, obj ? &(*obj)->has_name : NULL((void*)0), "name", &err);
321 if (obj && (*obj)->has_name) {
322 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
323 }
324 visit_end_optional(m, &err);
325
326 error_propagate(errp, err);
327}
328
329void visit_type_NameInfo(Visitor *m, NameInfo ** obj, const char *name, Error **errp)
330{
331 if (!error_is_set(errp)) {
332 Error *err = NULL((void*)0);
333 visit_start_struct(m, (void **)obj, "NameInfo", name, sizeof(NameInfo), &err);
334 if (!err) {
335 if (!obj || *obj) {
336 visit_type_NameInfo_fields(m, obj, &err);
337 error_propagate(errp, err);
338 err = NULL((void*)0);
339 }
340 /* Always call end_struct if start_struct succeeded. */
341 visit_end_struct(m, &err);
342 }
343 error_propagate(errp, err);
344 }
345}
346
347void visit_type_NameInfoList(Visitor *m, NameInfoList ** obj, const char *name, Error **errp)
348{
349 GenericList *i, **prev = (GenericList **)obj;
350 Error *err = NULL((void*)0);
351
352 if (!error_is_set(errp)) {
353 visit_start_list(m, name, &err);
354 if (!err) {
355 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
356 NameInfoList *native_i = (NameInfoList *)i;
357 visit_type_NameInfo(m, &native_i->value, NULL((void*)0), &err);
358 }
359 error_propagate(errp, err);
360 err = NULL((void*)0);
361
362 /* Always call end_list if start_list succeeded. */
363 visit_end_list(m, &err);
364 }
365 error_propagate(errp, err);
366 }
367}
368
369static void visit_type_VersionInfo_qemu_fields(Visitor *m, VersionInfo ** obj, Error **errp)
370{
371 Error *err = NULL((void*)0);
372 visit_type_int(m, obj ? &(*obj)->qemu.major : NULL((void*)0), "major", &err);
373 visit_type_int(m, obj ? &(*obj)->qemu.minor : NULL((void*)0), "minor", &err);
374 visit_type_int(m, obj ? &(*obj)->qemu.micro : NULL((void*)0), "micro", &err);
375
376 error_propagate(errp, err);
377}
378
379static void visit_type_VersionInfo_fields(Visitor *m, VersionInfo ** obj, Error **errp)
380{
381 Error *err = NULL((void*)0);
382 if (!error_is_set(errp)) {
383 Error **errp = &err; /* from outer scope */
384 Error *err = NULL((void*)0);
385 visit_start_struct(m, NULL((void*)0), "", "qemu", 0, &err);
386 if (!err) {
387 if (!obj || *obj) {
388 visit_type_VersionInfo_qemu_fields(m, obj, &err);
389 error_propagate(errp, err);
390 err = NULL((void*)0);
391 }
392 /* Always call end_struct if start_struct succeeded. */
393 visit_end_struct(m, &err);
394 }
395 error_propagate(errp, err);
396 }
397 visit_type_str(m, obj ? &(*obj)->package : NULL((void*)0), "package", &err);
398
399 error_propagate(errp, err);
400}
401
402void visit_type_VersionInfo(Visitor *m, VersionInfo ** obj, const char *name, Error **errp)
403{
404 if (!error_is_set(errp)) {
405 Error *err = NULL((void*)0);
406 visit_start_struct(m, (void **)obj, "VersionInfo", name, sizeof(VersionInfo), &err);
407 if (!err) {
408 if (!obj || *obj) {
409 visit_type_VersionInfo_fields(m, obj, &err);
410 error_propagate(errp, err);
411 err = NULL((void*)0);
412 }
413 /* Always call end_struct if start_struct succeeded. */
414 visit_end_struct(m, &err);
415 }
416 error_propagate(errp, err);
417 }
418}
419
420void visit_type_VersionInfoList(Visitor *m, VersionInfoList ** obj, const char *name, Error **errp)
421{
422 GenericList *i, **prev = (GenericList **)obj;
423 Error *err = NULL((void*)0);
424
425 if (!error_is_set(errp)) {
426 visit_start_list(m, name, &err);
427 if (!err) {
428 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
429 VersionInfoList *native_i = (VersionInfoList *)i;
430 visit_type_VersionInfo(m, &native_i->value, NULL((void*)0), &err);
431 }
432 error_propagate(errp, err);
433 err = NULL((void*)0);
434
435 /* Always call end_list if start_list succeeded. */
436 visit_end_list(m, &err);
437 }
438 error_propagate(errp, err);
439 }
440}
441
442static void visit_type_KvmInfo_fields(Visitor *m, KvmInfo ** obj, Error **errp)
443{
444 Error *err = NULL((void*)0);
445 visit_type_bool(m, obj ? &(*obj)->enabled : NULL((void*)0), "enabled", &err);
446 visit_type_bool(m, obj ? &(*obj)->present : NULL((void*)0), "present", &err);
447
448 error_propagate(errp, err);
449}
450
451void visit_type_KvmInfo(Visitor *m, KvmInfo ** obj, const char *name, Error **errp)
452{
453 if (!error_is_set(errp)) {
454 Error *err = NULL((void*)0);
455 visit_start_struct(m, (void **)obj, "KvmInfo", name, sizeof(KvmInfo), &err);
456 if (!err) {
457 if (!obj || *obj) {
458 visit_type_KvmInfo_fields(m, obj, &err);
459 error_propagate(errp, err);
460 err = NULL((void*)0);
461 }
462 /* Always call end_struct if start_struct succeeded. */
463 visit_end_struct(m, &err);
464 }
465 error_propagate(errp, err);
466 }
467}
468
469void visit_type_KvmInfoList(Visitor *m, KvmInfoList ** obj, const char *name, Error **errp)
470{
471 GenericList *i, **prev = (GenericList **)obj;
472 Error *err = NULL((void*)0);
473
474 if (!error_is_set(errp)) {
475 visit_start_list(m, name, &err);
476 if (!err) {
477 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
478 KvmInfoList *native_i = (KvmInfoList *)i;
479 visit_type_KvmInfo(m, &native_i->value, NULL((void*)0), &err);
480 }
481 error_propagate(errp, err);
482 err = NULL((void*)0);
483
484 /* Always call end_list if start_list succeeded. */
485 visit_end_list(m, &err);
486 }
487 error_propagate(errp, err);
488 }
489}
490
491void visit_type_RunStateList(Visitor *m, RunStateList ** obj, const char *name, Error **errp)
492{
493 GenericList *i, **prev = (GenericList **)obj;
494 Error *err = NULL((void*)0);
495
496 if (!error_is_set(errp)) {
497 visit_start_list(m, name, &err);
498 if (!err) {
499 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
500 RunStateList *native_i = (RunStateList *)i;
501 visit_type_RunState(m, &native_i->value, NULL((void*)0), &err);
502 }
503 error_propagate(errp, err);
504 err = NULL((void*)0);
505
506 /* Always call end_list if start_list succeeded. */
507 visit_end_list(m, &err);
508 }
509 error_propagate(errp, err);
510 }
511}
512
513void visit_type_RunState(Visitor *m, RunState * obj, const char *name, Error **errp)
514{
515 visit_type_enum(m, (int *)obj, RunState_lookup, "RunState", name, errp);
516}
517
518static void visit_type_SnapshotInfo_fields(Visitor *m, SnapshotInfo ** obj, Error **errp)
519{
520 Error *err = NULL((void*)0);
521 visit_type_str(m, obj ? &(*obj)->id : NULL((void*)0), "id", &err);
522 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
523 visit_type_int(m, obj ? &(*obj)->vm_state_size : NULL((void*)0), "vm-state-size", &err);
524 visit_type_int(m, obj ? &(*obj)->date_sec : NULL((void*)0), "date-sec", &err);
525 visit_type_int(m, obj ? &(*obj)->date_nsec : NULL((void*)0), "date-nsec", &err);
526 visit_type_int(m, obj ? &(*obj)->vm_clock_sec : NULL((void*)0), "vm-clock-sec", &err);
527 visit_type_int(m, obj ? &(*obj)->vm_clock_nsec : NULL((void*)0), "vm-clock-nsec", &err);
528
529 error_propagate(errp, err);
530}
531
532void visit_type_SnapshotInfo(Visitor *m, SnapshotInfo ** obj, const char *name, Error **errp)
533{
534 if (!error_is_set(errp)) {
535 Error *err = NULL((void*)0);
536 visit_start_struct(m, (void **)obj, "SnapshotInfo", name, sizeof(SnapshotInfo), &err);
537 if (!err) {
538 if (!obj || *obj) {
539 visit_type_SnapshotInfo_fields(m, obj, &err);
540 error_propagate(errp, err);
541 err = NULL((void*)0);
542 }
543 /* Always call end_struct if start_struct succeeded. */
544 visit_end_struct(m, &err);
545 }
546 error_propagate(errp, err);
547 }
548}
549
550void visit_type_SnapshotInfoList(Visitor *m, SnapshotInfoList ** obj, const char *name, Error **errp)
551{
552 GenericList *i, **prev = (GenericList **)obj;
553 Error *err = NULL((void*)0);
554
555 if (!error_is_set(errp)) {
556 visit_start_list(m, name, &err);
557 if (!err) {
558 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
559 SnapshotInfoList *native_i = (SnapshotInfoList *)i;
560 visit_type_SnapshotInfo(m, &native_i->value, NULL((void*)0), &err);
561 }
562 error_propagate(errp, err);
563 err = NULL((void*)0);
564
565 /* Always call end_list if start_list succeeded. */
566 visit_end_list(m, &err);
567 }
568 error_propagate(errp, err);
569 }
570}
571
572static void visit_type_ImageInfoSpecificQCow2_fields(Visitor *m, ImageInfoSpecificQCow2 ** obj, Error **errp)
573{
574 Error *err = NULL((void*)0);
575 visit_type_str(m, obj ? &(*obj)->compat : NULL((void*)0), "compat", &err);
576 visit_start_optional(m, obj ? &(*obj)->has_lazy_refcounts : NULL((void*)0), "lazy-refcounts", &err);
577 if (obj && (*obj)->has_lazy_refcounts) {
578 visit_type_bool(m, obj ? &(*obj)->lazy_refcounts : NULL((void*)0), "lazy-refcounts", &err);
579 }
580 visit_end_optional(m, &err);
581
582 error_propagate(errp, err);
583}
584
585void visit_type_ImageInfoSpecificQCow2(Visitor *m, ImageInfoSpecificQCow2 ** obj, const char *name, Error **errp)
586{
587 if (!error_is_set(errp)) {
588 Error *err = NULL((void*)0);
589 visit_start_struct(m, (void **)obj, "ImageInfoSpecificQCow2", name, sizeof(ImageInfoSpecificQCow2), &err);
590 if (!err) {
591 if (!obj || *obj) {
592 visit_type_ImageInfoSpecificQCow2_fields(m, obj, &err);
593 error_propagate(errp, err);
594 err = NULL((void*)0);
595 }
596 /* Always call end_struct if start_struct succeeded. */
597 visit_end_struct(m, &err);
598 }
599 error_propagate(errp, err);
600 }
601}
602
603void visit_type_ImageInfoSpecificQCow2List(Visitor *m, ImageInfoSpecificQCow2List ** obj, const char *name, Error **errp)
604{
605 GenericList *i, **prev = (GenericList **)obj;
606 Error *err = NULL((void*)0);
607
608 if (!error_is_set(errp)) {
609 visit_start_list(m, name, &err);
610 if (!err) {
611 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
612 ImageInfoSpecificQCow2List *native_i = (ImageInfoSpecificQCow2List *)i;
613 visit_type_ImageInfoSpecificQCow2(m, &native_i->value, NULL((void*)0), &err);
614 }
615 error_propagate(errp, err);
616 err = NULL((void*)0);
617
618 /* Always call end_list if start_list succeeded. */
619 visit_end_list(m, &err);
620 }
621 error_propagate(errp, err);
622 }
623}
624
625static void visit_type_ImageInfoSpecificVmdk_fields(Visitor *m, ImageInfoSpecificVmdk ** obj, Error **errp)
626{
627 Error *err = NULL((void*)0);
628 visit_type_str(m, obj ? &(*obj)->create_type : NULL((void*)0), "create-type", &err);
629 visit_type_int(m, obj ? &(*obj)->cid : NULL((void*)0), "cid", &err);
630 visit_type_int(m, obj ? &(*obj)->parent_cid : NULL((void*)0), "parent-cid", &err);
631 visit_type_ImageInfoList(m, obj ? &(*obj)->extents : NULL((void*)0), "extents", &err);
632
633 error_propagate(errp, err);
634}
635
636void visit_type_ImageInfoSpecificVmdk(Visitor *m, ImageInfoSpecificVmdk ** obj, const char *name, Error **errp)
637{
638 if (!error_is_set(errp)) {
639 Error *err = NULL((void*)0);
640 visit_start_struct(m, (void **)obj, "ImageInfoSpecificVmdk", name, sizeof(ImageInfoSpecificVmdk), &err);
641 if (!err) {
642 if (!obj || *obj) {
643 visit_type_ImageInfoSpecificVmdk_fields(m, obj, &err);
644 error_propagate(errp, err);
645 err = NULL((void*)0);
646 }
647 /* Always call end_struct if start_struct succeeded. */
648 visit_end_struct(m, &err);
649 }
650 error_propagate(errp, err);
651 }
652}
653
654void visit_type_ImageInfoSpecificVmdkList(Visitor *m, ImageInfoSpecificVmdkList ** obj, const char *name, Error **errp)
655{
656 GenericList *i, **prev = (GenericList **)obj;
657 Error *err = NULL((void*)0);
658
659 if (!error_is_set(errp)) {
660 visit_start_list(m, name, &err);
661 if (!err) {
662 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
663 ImageInfoSpecificVmdkList *native_i = (ImageInfoSpecificVmdkList *)i;
664 visit_type_ImageInfoSpecificVmdk(m, &native_i->value, NULL((void*)0), &err);
665 }
666 error_propagate(errp, err);
667 err = NULL((void*)0);
668
669 /* Always call end_list if start_list succeeded. */
670 visit_end_list(m, &err);
671 }
672 error_propagate(errp, err);
673 }
674}
675
676void visit_type_ImageInfoSpecificKind(Visitor *m, ImageInfoSpecificKind * obj, const char *name, Error **errp)
677{
678 visit_type_enum(m, (int *)obj, ImageInfoSpecificKind_lookup, "ImageInfoSpecificKind", name, errp);
679}
680
681void visit_type_ImageInfoSpecific(Visitor *m, ImageInfoSpecific ** obj, const char *name, Error **errp)
682{
683 Error *err = NULL((void*)0);
684
685 if (!error_is_set(errp)) {
686 visit_start_struct(m, (void **)obj, "ImageInfoSpecific", name, sizeof(ImageInfoSpecific), &err);
687 if (!err) {
688 if (obj && *obj) {
689 visit_type_ImageInfoSpecificKind(m, &(*obj)->kind, "type", &err);
690 if (!err) {
691 switch ((*obj)->kind) {
692 case IMAGE_INFO_SPECIFIC_KIND_QCOW2:
693 visit_type_ImageInfoSpecificQCow2(m, &(*obj)->qcow2, "data", &err);
694 break;
695 case IMAGE_INFO_SPECIFIC_KIND_VMDK:
696 visit_type_ImageInfoSpecificVmdk(m, &(*obj)->vmdk, "data", &err);
697 break;
698 default:
699 abort();
700 }
701 }
702 error_propagate(errp, err);
703 err = NULL((void*)0);
704 }
705 /* Always call end_struct if start_struct succeeded. */
706 visit_end_struct(m, &err);
707 }
708 error_propagate(errp, err);
709 }
710}
711
712void visit_type_ImageInfoSpecificList(Visitor *m, ImageInfoSpecificList ** obj, const char *name, Error **errp)
713{
714 GenericList *i, **prev = (GenericList **)obj;
715 Error *err = NULL((void*)0);
716
717 if (!error_is_set(errp)) {
718 visit_start_list(m, name, &err);
719 if (!err) {
720 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
721 ImageInfoSpecificList *native_i = (ImageInfoSpecificList *)i;
722 visit_type_ImageInfoSpecific(m, &native_i->value, NULL((void*)0), &err);
723 }
724 error_propagate(errp, err);
725 err = NULL((void*)0);
726
727 /* Always call end_list if start_list succeeded. */
728 visit_end_list(m, &err);
729 }
730 error_propagate(errp, err);
731 }
732}
733
734static void visit_type_ImageInfo_fields(Visitor *m, ImageInfo ** obj, Error **errp)
735{
736 Error *err = NULL((void*)0);
737 visit_type_str(m, obj ? &(*obj)->filename : NULL((void*)0), "filename", &err);
738 visit_type_str(m, obj ? &(*obj)->format : NULL((void*)0), "format", &err);
739 visit_start_optional(m, obj ? &(*obj)->has_dirty_flag : NULL((void*)0), "dirty-flag", &err);
740 if (obj && (*obj)->has_dirty_flag) {
741 visit_type_bool(m, obj ? &(*obj)->dirty_flag : NULL((void*)0), "dirty-flag", &err);
742 }
743 visit_end_optional(m, &err);
744 visit_start_optional(m, obj ? &(*obj)->has_actual_size : NULL((void*)0), "actual-size", &err);
745 if (obj && (*obj)->has_actual_size) {
746 visit_type_int(m, obj ? &(*obj)->actual_size : NULL((void*)0), "actual-size", &err);
747 }
748 visit_end_optional(m, &err);
749 visit_type_int(m, obj ? &(*obj)->virtual_size : NULL((void*)0), "virtual-size", &err);
750 visit_start_optional(m, obj ? &(*obj)->has_cluster_size : NULL((void*)0), "cluster-size", &err);
751 if (obj && (*obj)->has_cluster_size) {
752 visit_type_int(m, obj ? &(*obj)->cluster_size : NULL((void*)0), "cluster-size", &err);
753 }
754 visit_end_optional(m, &err);
755 visit_start_optional(m, obj ? &(*obj)->has_encrypted : NULL((void*)0), "encrypted", &err);
756 if (obj && (*obj)->has_encrypted) {
757 visit_type_bool(m, obj ? &(*obj)->encrypted : NULL((void*)0), "encrypted", &err);
758 }
759 visit_end_optional(m, &err);
760 visit_start_optional(m, obj ? &(*obj)->has_compressed : NULL((void*)0), "compressed", &err);
761 if (obj && (*obj)->has_compressed) {
762 visit_type_bool(m, obj ? &(*obj)->compressed : NULL((void*)0), "compressed", &err);
763 }
764 visit_end_optional(m, &err);
765 visit_start_optional(m, obj ? &(*obj)->has_backing_filename : NULL((void*)0), "backing-filename", &err);
766 if (obj && (*obj)->has_backing_filename) {
767 visit_type_str(m, obj ? &(*obj)->backing_filename : NULL((void*)0), "backing-filename", &err);
768 }
769 visit_end_optional(m, &err);
770 visit_start_optional(m, obj ? &(*obj)->has_full_backing_filename : NULL((void*)0), "full-backing-filename", &err);
771 if (obj && (*obj)->has_full_backing_filename) {
772 visit_type_str(m, obj ? &(*obj)->full_backing_filename : NULL((void*)0), "full-backing-filename", &err);
773 }
774 visit_end_optional(m, &err);
775 visit_start_optional(m, obj ? &(*obj)->has_backing_filename_format : NULL((void*)0), "backing-filename-format", &err);
776 if (obj && (*obj)->has_backing_filename_format) {
777 visit_type_str(m, obj ? &(*obj)->backing_filename_format : NULL((void*)0), "backing-filename-format", &err);
778 }
779 visit_end_optional(m, &err);
780 visit_start_optional(m, obj ? &(*obj)->has_snapshots : NULL((void*)0), "snapshots", &err);
781 if (obj && (*obj)->has_snapshots) {
782 visit_type_SnapshotInfoList(m, obj ? &(*obj)->snapshots : NULL((void*)0), "snapshots", &err);
783 }
784 visit_end_optional(m, &err);
785 visit_start_optional(m, obj ? &(*obj)->has_backing_image : NULL((void*)0), "backing-image", &err);
786 if (obj && (*obj)->has_backing_image) {
787 visit_type_ImageInfo(m, obj ? &(*obj)->backing_image : NULL((void*)0), "backing-image", &err);
788 }
789 visit_end_optional(m, &err);
790 visit_start_optional(m, obj ? &(*obj)->has_format_specific : NULL((void*)0), "format-specific", &err);
791 if (obj && (*obj)->has_format_specific) {
792 visit_type_ImageInfoSpecific(m, obj ? &(*obj)->format_specific : NULL((void*)0), "format-specific", &err);
793 }
794 visit_end_optional(m, &err);
795
796 error_propagate(errp, err);
797}
798
799void visit_type_ImageInfo(Visitor *m, ImageInfo ** obj, const char *name, Error **errp)
800{
801 if (!error_is_set(errp)) {
802 Error *err = NULL((void*)0);
803 visit_start_struct(m, (void **)obj, "ImageInfo", name, sizeof(ImageInfo), &err);
804 if (!err) {
805 if (!obj || *obj) {
806 visit_type_ImageInfo_fields(m, obj, &err);
807 error_propagate(errp, err);
808 err = NULL((void*)0);
809 }
810 /* Always call end_struct if start_struct succeeded. */
811 visit_end_struct(m, &err);
812 }
813 error_propagate(errp, err);
814 }
815}
816
817void visit_type_ImageInfoList(Visitor *m, ImageInfoList ** obj, const char *name, Error **errp)
818{
819 GenericList *i, **prev = (GenericList **)obj;
820 Error *err = NULL((void*)0);
821
822 if (!error_is_set(errp)) {
823 visit_start_list(m, name, &err);
824 if (!err) {
825 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
826 ImageInfoList *native_i = (ImageInfoList *)i;
827 visit_type_ImageInfo(m, &native_i->value, NULL((void*)0), &err);
828 }
829 error_propagate(errp, err);
830 err = NULL((void*)0);
831
832 /* Always call end_list if start_list succeeded. */
833 visit_end_list(m, &err);
834 }
835 error_propagate(errp, err);
836 }
837}
838
839static void visit_type_ImageCheck_fields(Visitor *m, ImageCheck ** obj, Error **errp)
840{
841 Error *err = NULL((void*)0);
842 visit_type_str(m, obj ? &(*obj)->filename : NULL((void*)0), "filename", &err);
843 visit_type_str(m, obj ? &(*obj)->format : NULL((void*)0), "format", &err);
844 visit_type_int(m, obj ? &(*obj)->check_errors : NULL((void*)0), "check-errors", &err);
845 visit_start_optional(m, obj ? &(*obj)->has_image_end_offset : NULL((void*)0), "image-end-offset", &err);
846 if (obj && (*obj)->has_image_end_offset) {
847 visit_type_int(m, obj ? &(*obj)->image_end_offset : NULL((void*)0), "image-end-offset", &err);
848 }
849 visit_end_optional(m, &err);
850 visit_start_optional(m, obj ? &(*obj)->has_corruptions : NULL((void*)0), "corruptions", &err);
851 if (obj && (*obj)->has_corruptions) {
852 visit_type_int(m, obj ? &(*obj)->corruptions : NULL((void*)0), "corruptions", &err);
853 }
854 visit_end_optional(m, &err);
855 visit_start_optional(m, obj ? &(*obj)->has_leaks : NULL((void*)0), "leaks", &err);
856 if (obj && (*obj)->has_leaks) {
857 visit_type_int(m, obj ? &(*obj)->leaks : NULL((void*)0), "leaks", &err);
858 }
859 visit_end_optional(m, &err);
860 visit_start_optional(m, obj ? &(*obj)->has_corruptions_fixed : NULL((void*)0), "corruptions-fixed", &err);
861 if (obj && (*obj)->has_corruptions_fixed) {
862 visit_type_int(m, obj ? &(*obj)->corruptions_fixed : NULL((void*)0), "corruptions-fixed", &err);
863 }
864 visit_end_optional(m, &err);
865 visit_start_optional(m, obj ? &(*obj)->has_leaks_fixed : NULL((void*)0), "leaks-fixed", &err);
866 if (obj && (*obj)->has_leaks_fixed) {
867 visit_type_int(m, obj ? &(*obj)->leaks_fixed : NULL((void*)0), "leaks-fixed", &err);
868 }
869 visit_end_optional(m, &err);
870 visit_start_optional(m, obj ? &(*obj)->has_total_clusters : NULL((void*)0), "total-clusters", &err);
871 if (obj && (*obj)->has_total_clusters) {
872 visit_type_int(m, obj ? &(*obj)->total_clusters : NULL((void*)0), "total-clusters", &err);
873 }
874 visit_end_optional(m, &err);
875 visit_start_optional(m, obj ? &(*obj)->has_allocated_clusters : NULL((void*)0), "allocated-clusters", &err);
876 if (obj && (*obj)->has_allocated_clusters) {
877 visit_type_int(m, obj ? &(*obj)->allocated_clusters : NULL((void*)0), "allocated-clusters", &err);
878 }
879 visit_end_optional(m, &err);
880 visit_start_optional(m, obj ? &(*obj)->has_fragmented_clusters : NULL((void*)0), "fragmented-clusters", &err);
881 if (obj && (*obj)->has_fragmented_clusters) {
882 visit_type_int(m, obj ? &(*obj)->fragmented_clusters : NULL((void*)0), "fragmented-clusters", &err);
883 }
884 visit_end_optional(m, &err);
885 visit_start_optional(m, obj ? &(*obj)->has_compressed_clusters : NULL((void*)0), "compressed-clusters", &err);
886 if (obj && (*obj)->has_compressed_clusters) {
887 visit_type_int(m, obj ? &(*obj)->compressed_clusters : NULL((void*)0), "compressed-clusters", &err);
888 }
889 visit_end_optional(m, &err);
890
891 error_propagate(errp, err);
892}
893
894void visit_type_ImageCheck(Visitor *m, ImageCheck ** obj, const char *name, Error **errp)
895{
896 if (!error_is_set(errp)) {
897 Error *err = NULL((void*)0);
898 visit_start_struct(m, (void **)obj, "ImageCheck", name, sizeof(ImageCheck), &err);
899 if (!err) {
900 if (!obj || *obj) {
901 visit_type_ImageCheck_fields(m, obj, &err);
902 error_propagate(errp, err);
903 err = NULL((void*)0);
904 }
905 /* Always call end_struct if start_struct succeeded. */
906 visit_end_struct(m, &err);
907 }
908 error_propagate(errp, err);
909 }
910}
911
912void visit_type_ImageCheckList(Visitor *m, ImageCheckList ** obj, const char *name, Error **errp)
913{
914 GenericList *i, **prev = (GenericList **)obj;
915 Error *err = NULL((void*)0);
916
917 if (!error_is_set(errp)) {
918 visit_start_list(m, name, &err);
919 if (!err) {
920 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
921 ImageCheckList *native_i = (ImageCheckList *)i;
922 visit_type_ImageCheck(m, &native_i->value, NULL((void*)0), &err);
923 }
924 error_propagate(errp, err);
925 err = NULL((void*)0);
926
927 /* Always call end_list if start_list succeeded. */
928 visit_end_list(m, &err);
929 }
930 error_propagate(errp, err);
931 }
932}
933
934static void visit_type_StatusInfo_fields(Visitor *m, StatusInfo ** obj, Error **errp)
935{
936 Error *err = NULL((void*)0);
937 visit_type_bool(m, obj ? &(*obj)->running : NULL((void*)0), "running", &err);
938 visit_type_bool(m, obj ? &(*obj)->singlestep : NULL((void*)0), "singlestep", &err);
939 visit_type_RunState(m, obj ? &(*obj)->status : NULL((void*)0), "status", &err);
940
941 error_propagate(errp, err);
942}
943
944void visit_type_StatusInfo(Visitor *m, StatusInfo ** obj, const char *name, Error **errp)
945{
946 if (!error_is_set(errp)) {
947 Error *err = NULL((void*)0);
948 visit_start_struct(m, (void **)obj, "StatusInfo", name, sizeof(StatusInfo), &err);
949 if (!err) {
950 if (!obj || *obj) {
951 visit_type_StatusInfo_fields(m, obj, &err);
952 error_propagate(errp, err);
953 err = NULL((void*)0);
954 }
955 /* Always call end_struct if start_struct succeeded. */
956 visit_end_struct(m, &err);
957 }
958 error_propagate(errp, err);
959 }
960}
961
962void visit_type_StatusInfoList(Visitor *m, StatusInfoList ** obj, const char *name, Error **errp)
963{
964 GenericList *i, **prev = (GenericList **)obj;
965 Error *err = NULL((void*)0);
966
967 if (!error_is_set(errp)) {
968 visit_start_list(m, name, &err);
969 if (!err) {
970 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
971 StatusInfoList *native_i = (StatusInfoList *)i;
972 visit_type_StatusInfo(m, &native_i->value, NULL((void*)0), &err);
973 }
974 error_propagate(errp, err);
975 err = NULL((void*)0);
976
977 /* Always call end_list if start_list succeeded. */
978 visit_end_list(m, &err);
979 }
980 error_propagate(errp, err);
981 }
982}
983
984static void visit_type_UuidInfo_fields(Visitor *m, UuidInfo ** obj, Error **errp)
985{
986 Error *err = NULL((void*)0);
987 visit_type_str(m, obj ? &(*obj)->UUID : NULL((void*)0), "UUID", &err);
988
989 error_propagate(errp, err);
990}
991
992void visit_type_UuidInfo(Visitor *m, UuidInfo ** obj, const char *name, Error **errp)
993{
994 if (!error_is_set(errp)) {
995 Error *err = NULL((void*)0);
996 visit_start_struct(m, (void **)obj, "UuidInfo", name, sizeof(UuidInfo), &err);
997 if (!err) {
998 if (!obj || *obj) {
999 visit_type_UuidInfo_fields(m, obj, &err);
1000 error_propagate(errp, err);
1001 err = NULL((void*)0);
1002 }
1003 /* Always call end_struct if start_struct succeeded. */
1004 visit_end_struct(m, &err);
1005 }
1006 error_propagate(errp, err);
1007 }
1008}
1009
1010void visit_type_UuidInfoList(Visitor *m, UuidInfoList ** obj, const char *name, Error **errp)
1011{
1012 GenericList *i, **prev = (GenericList **)obj;
1013 Error *err = NULL((void*)0);
1014
1015 if (!error_is_set(errp)) {
1016 visit_start_list(m, name, &err);
1017 if (!err) {
1018 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1019 UuidInfoList *native_i = (UuidInfoList *)i;
1020 visit_type_UuidInfo(m, &native_i->value, NULL((void*)0), &err);
1021 }
1022 error_propagate(errp, err);
1023 err = NULL((void*)0);
1024
1025 /* Always call end_list if start_list succeeded. */
1026 visit_end_list(m, &err);
1027 }
1028 error_propagate(errp, err);
1029 }
1030}
1031
1032static void visit_type_ChardevInfo_fields(Visitor *m, ChardevInfo ** obj, Error **errp)
1033{
1034 Error *err = NULL((void*)0);
1035 visit_type_str(m, obj ? &(*obj)->label : NULL((void*)0), "label", &err);
1036 visit_type_str(m, obj ? &(*obj)->filename : NULL((void*)0), "filename", &err);
1037
1038 error_propagate(errp, err);
1039}
1040
1041void visit_type_ChardevInfo(Visitor *m, ChardevInfo ** obj, const char *name, Error **errp)
1042{
1043 if (!error_is_set(errp)) {
1044 Error *err = NULL((void*)0);
1045 visit_start_struct(m, (void **)obj, "ChardevInfo", name, sizeof(ChardevInfo), &err);
1046 if (!err) {
1047 if (!obj || *obj) {
1048 visit_type_ChardevInfo_fields(m, obj, &err);
1049 error_propagate(errp, err);
1050 err = NULL((void*)0);
1051 }
1052 /* Always call end_struct if start_struct succeeded. */
1053 visit_end_struct(m, &err);
1054 }
1055 error_propagate(errp, err);
1056 }
1057}
1058
1059void visit_type_ChardevInfoList(Visitor *m, ChardevInfoList ** obj, const char *name, Error **errp)
1060{
1061 GenericList *i, **prev = (GenericList **)obj;
1062 Error *err = NULL((void*)0);
1063
1064 if (!error_is_set(errp)) {
1065 visit_start_list(m, name, &err);
1066 if (!err) {
1067 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1068 ChardevInfoList *native_i = (ChardevInfoList *)i;
1069 visit_type_ChardevInfo(m, &native_i->value, NULL((void*)0), &err);
1070 }
1071 error_propagate(errp, err);
1072 err = NULL((void*)0);
1073
1074 /* Always call end_list if start_list succeeded. */
1075 visit_end_list(m, &err);
1076 }
1077 error_propagate(errp, err);
1078 }
1079}
1080
1081void visit_type_DataFormatList(Visitor *m, DataFormatList ** obj, const char *name, Error **errp)
1082{
1083 GenericList *i, **prev = (GenericList **)obj;
1084 Error *err = NULL((void*)0);
1085
1086 if (!error_is_set(errp)) {
1087 visit_start_list(m, name, &err);
1088 if (!err) {
1089 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1090 DataFormatList *native_i = (DataFormatList *)i;
1091 visit_type_DataFormat(m, &native_i->value, NULL((void*)0), &err);
1092 }
1093 error_propagate(errp, err);
1094 err = NULL((void*)0);
1095
1096 /* Always call end_list if start_list succeeded. */
1097 visit_end_list(m, &err);
1098 }
1099 error_propagate(errp, err);
1100 }
1101}
1102
1103void visit_type_DataFormat(Visitor *m, DataFormat * obj, const char *name, Error **errp)
1104{
1105 visit_type_enum(m, (int *)obj, DataFormat_lookup, "DataFormat", name, errp);
1106}
1107
1108static void visit_type_CommandInfo_fields(Visitor *m, CommandInfo ** obj, Error **errp)
1109{
1110 Error *err = NULL((void*)0);
1111 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
1112
1113 error_propagate(errp, err);
1114}
1115
1116void visit_type_CommandInfo(Visitor *m, CommandInfo ** obj, const char *name, Error **errp)
1117{
1118 if (!error_is_set(errp)) {
1119 Error *err = NULL((void*)0);
1120 visit_start_struct(m, (void **)obj, "CommandInfo", name, sizeof(CommandInfo), &err);
1121 if (!err) {
1122 if (!obj || *obj) {
1123 visit_type_CommandInfo_fields(m, obj, &err);
1124 error_propagate(errp, err);
1125 err = NULL((void*)0);
1126 }
1127 /* Always call end_struct if start_struct succeeded. */
1128 visit_end_struct(m, &err);
1129 }
1130 error_propagate(errp, err);
1131 }
1132}
1133
1134void visit_type_CommandInfoList(Visitor *m, CommandInfoList ** obj, const char *name, Error **errp)
1135{
1136 GenericList *i, **prev = (GenericList **)obj;
1137 Error *err = NULL((void*)0);
1138
1139 if (!error_is_set(errp)) {
1140 visit_start_list(m, name, &err);
1141 if (!err) {
1142 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1143 CommandInfoList *native_i = (CommandInfoList *)i;
1144 visit_type_CommandInfo(m, &native_i->value, NULL((void*)0), &err);
1145 }
1146 error_propagate(errp, err);
1147 err = NULL((void*)0);
1148
1149 /* Always call end_list if start_list succeeded. */
1150 visit_end_list(m, &err);
1151 }
1152 error_propagate(errp, err);
1153 }
1154}
1155
1156static void visit_type_EventInfo_fields(Visitor *m, EventInfo ** obj, Error **errp)
1157{
1158 Error *err = NULL((void*)0);
1159 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
1160
1161 error_propagate(errp, err);
1162}
1163
1164void visit_type_EventInfo(Visitor *m, EventInfo ** obj, const char *name, Error **errp)
1165{
1166 if (!error_is_set(errp)) {
1167 Error *err = NULL((void*)0);
1168 visit_start_struct(m, (void **)obj, "EventInfo", name, sizeof(EventInfo), &err);
1169 if (!err) {
1170 if (!obj || *obj) {
1171 visit_type_EventInfo_fields(m, obj, &err);
1172 error_propagate(errp, err);
1173 err = NULL((void*)0);
1174 }
1175 /* Always call end_struct if start_struct succeeded. */
1176 visit_end_struct(m, &err);
1177 }
1178 error_propagate(errp, err);
1179 }
1180}
1181
1182void visit_type_EventInfoList(Visitor *m, EventInfoList ** obj, const char *name, Error **errp)
1183{
1184 GenericList *i, **prev = (GenericList **)obj;
1185 Error *err = NULL((void*)0);
1186
1187 if (!error_is_set(errp)) {
1188 visit_start_list(m, name, &err);
1189 if (!err) {
1190 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1191 EventInfoList *native_i = (EventInfoList *)i;
1192 visit_type_EventInfo(m, &native_i->value, NULL((void*)0), &err);
1193 }
1194 error_propagate(errp, err);
1195 err = NULL((void*)0);
1196
1197 /* Always call end_list if start_list succeeded. */
1198 visit_end_list(m, &err);
1199 }
1200 error_propagate(errp, err);
1201 }
1202}
1203
1204static void visit_type_MigrationStats_fields(Visitor *m, MigrationStats ** obj, Error **errp)
1205{
1206 Error *err = NULL((void*)0);
1207 visit_type_int(m, obj ? &(*obj)->transferred : NULL((void*)0), "transferred", &err);
1208 visit_type_int(m, obj ? &(*obj)->remaining : NULL((void*)0), "remaining", &err);
1209 visit_type_int(m, obj ? &(*obj)->total : NULL((void*)0), "total", &err);
1210 visit_type_int(m, obj ? &(*obj)->duplicate : NULL((void*)0), "duplicate", &err);
1211 visit_type_int(m, obj ? &(*obj)->skipped : NULL((void*)0), "skipped", &err);
1212 visit_type_int(m, obj ? &(*obj)->normal : NULL((void*)0), "normal", &err);
1213 visit_type_int(m, obj ? &(*obj)->normal_bytes : NULL((void*)0), "normal-bytes", &err);
1214 visit_type_int(m, obj ? &(*obj)->dirty_pages_rate : NULL((void*)0), "dirty-pages-rate", &err);
1215 visit_type_number(m, obj ? &(*obj)->mbps : NULL((void*)0), "mbps", &err);
1216
1217 error_propagate(errp, err);
1218}
1219
1220void visit_type_MigrationStats(Visitor *m, MigrationStats ** obj, const char *name, Error **errp)
1221{
1222 if (!error_is_set(errp)) {
1223 Error *err = NULL((void*)0);
1224 visit_start_struct(m, (void **)obj, "MigrationStats", name, sizeof(MigrationStats), &err);
1225 if (!err) {
1226 if (!obj || *obj) {
1227 visit_type_MigrationStats_fields(m, obj, &err);
1228 error_propagate(errp, err);
1229 err = NULL((void*)0);
1230 }
1231 /* Always call end_struct if start_struct succeeded. */
1232 visit_end_struct(m, &err);
1233 }
1234 error_propagate(errp, err);
1235 }
1236}
1237
1238void visit_type_MigrationStatsList(Visitor *m, MigrationStatsList ** obj, const char *name, Error **errp)
1239{
1240 GenericList *i, **prev = (GenericList **)obj;
1241 Error *err = NULL((void*)0);
1242
1243 if (!error_is_set(errp)) {
1244 visit_start_list(m, name, &err);
1245 if (!err) {
1246 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1247 MigrationStatsList *native_i = (MigrationStatsList *)i;
1248 visit_type_MigrationStats(m, &native_i->value, NULL((void*)0), &err);
1249 }
1250 error_propagate(errp, err);
1251 err = NULL((void*)0);
1252
1253 /* Always call end_list if start_list succeeded. */
1254 visit_end_list(m, &err);
1255 }
1256 error_propagate(errp, err);
1257 }
1258}
1259
1260static void visit_type_XBZRLECacheStats_fields(Visitor *m, XBZRLECacheStats ** obj, Error **errp)
1261{
1262 Error *err = NULL((void*)0);
1263 visit_type_int(m, obj ? &(*obj)->cache_size : NULL((void*)0), "cache-size", &err);
1264 visit_type_int(m, obj ? &(*obj)->bytes : NULL((void*)0), "bytes", &err);
1265 visit_type_int(m, obj ? &(*obj)->pages : NULL((void*)0), "pages", &err);
1266 visit_type_int(m, obj ? &(*obj)->cache_miss : NULL((void*)0), "cache-miss", &err);
1267 visit_type_int(m, obj ? &(*obj)->overflow : NULL((void*)0), "overflow", &err);
1268
1269 error_propagate(errp, err);
1270}
1271
1272void visit_type_XBZRLECacheStats(Visitor *m, XBZRLECacheStats ** obj, const char *name, Error **errp)
1273{
1274 if (!error_is_set(errp)) {
1275 Error *err = NULL((void*)0);
1276 visit_start_struct(m, (void **)obj, "XBZRLECacheStats", name, sizeof(XBZRLECacheStats), &err);
1277 if (!err) {
1278 if (!obj || *obj) {
1279 visit_type_XBZRLECacheStats_fields(m, obj, &err);
1280 error_propagate(errp, err);
1281 err = NULL((void*)0);
1282 }
1283 /* Always call end_struct if start_struct succeeded. */
1284 visit_end_struct(m, &err);
1285 }
1286 error_propagate(errp, err);
1287 }
1288}
1289
1290void visit_type_XBZRLECacheStatsList(Visitor *m, XBZRLECacheStatsList ** obj, const char *name, Error **errp)
1291{
1292 GenericList *i, **prev = (GenericList **)obj;
1293 Error *err = NULL((void*)0);
1294
1295 if (!error_is_set(errp)) {
1296 visit_start_list(m, name, &err);
1297 if (!err) {
1298 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1299 XBZRLECacheStatsList *native_i = (XBZRLECacheStatsList *)i;
1300 visit_type_XBZRLECacheStats(m, &native_i->value, NULL((void*)0), &err);
1301 }
1302 error_propagate(errp, err);
1303 err = NULL((void*)0);
1304
1305 /* Always call end_list if start_list succeeded. */
1306 visit_end_list(m, &err);
1307 }
1308 error_propagate(errp, err);
1309 }
1310}
1311
1312static void visit_type_MigrationInfo_fields(Visitor *m, MigrationInfo ** obj, Error **errp)
1313{
1314 Error *err = NULL((void*)0);
1315 visit_start_optional(m, obj ? &(*obj)->has_status : NULL((void*)0), "status", &err);
1316 if (obj && (*obj)->has_status) {
1317 visit_type_str(m, obj ? &(*obj)->status : NULL((void*)0), "status", &err);
1318 }
1319 visit_end_optional(m, &err);
1320 visit_start_optional(m, obj ? &(*obj)->has_ram : NULL((void*)0), "ram", &err);
1321 if (obj && (*obj)->has_ram) {
1322 visit_type_MigrationStats(m, obj ? &(*obj)->ram : NULL((void*)0), "ram", &err);
1323 }
1324 visit_end_optional(m, &err);
1325 visit_start_optional(m, obj ? &(*obj)->has_disk : NULL((void*)0), "disk", &err);
1326 if (obj && (*obj)->has_disk) {
1327 visit_type_MigrationStats(m, obj ? &(*obj)->disk : NULL((void*)0), "disk", &err);
1328 }
1329 visit_end_optional(m, &err);
1330 visit_start_optional(m, obj ? &(*obj)->has_xbzrle_cache : NULL((void*)0), "xbzrle-cache", &err);
1331 if (obj && (*obj)->has_xbzrle_cache) {
1332 visit_type_XBZRLECacheStats(m, obj ? &(*obj)->xbzrle_cache : NULL((void*)0), "xbzrle-cache", &err);
1333 }
1334 visit_end_optional(m, &err);
1335 visit_start_optional(m, obj ? &(*obj)->has_total_time : NULL((void*)0), "total-time", &err);
1336 if (obj && (*obj)->has_total_time) {
1337 visit_type_int(m, obj ? &(*obj)->total_time : NULL((void*)0), "total-time", &err);
1338 }
1339 visit_end_optional(m, &err);
1340 visit_start_optional(m, obj ? &(*obj)->has_expected_downtime : NULL((void*)0), "expected-downtime", &err);
1341 if (obj && (*obj)->has_expected_downtime) {
1342 visit_type_int(m, obj ? &(*obj)->expected_downtime : NULL((void*)0), "expected-downtime", &err);
1343 }
1344 visit_end_optional(m, &err);
1345 visit_start_optional(m, obj ? &(*obj)->has_downtime : NULL((void*)0), "downtime", &err);
1346 if (obj && (*obj)->has_downtime) {
1347 visit_type_int(m, obj ? &(*obj)->downtime : NULL((void*)0), "downtime", &err);
1348 }
1349 visit_end_optional(m, &err);
1350 visit_start_optional(m, obj ? &(*obj)->has_setup_time : NULL((void*)0), "setup-time", &err);
1351 if (obj && (*obj)->has_setup_time) {
1352 visit_type_int(m, obj ? &(*obj)->setup_time : NULL((void*)0), "setup-time", &err);
1353 }
1354 visit_end_optional(m, &err);
1355
1356 error_propagate(errp, err);
1357}
1358
1359void visit_type_MigrationInfo(Visitor *m, MigrationInfo ** obj, const char *name, Error **errp)
1360{
1361 if (!error_is_set(errp)) {
1362 Error *err = NULL((void*)0);
1363 visit_start_struct(m, (void **)obj, "MigrationInfo", name, sizeof(MigrationInfo), &err);
1364 if (!err) {
1365 if (!obj || *obj) {
1366 visit_type_MigrationInfo_fields(m, obj, &err);
1367 error_propagate(errp, err);
1368 err = NULL((void*)0);
1369 }
1370 /* Always call end_struct if start_struct succeeded. */
1371 visit_end_struct(m, &err);
1372 }
1373 error_propagate(errp, err);
1374 }
1375}
1376
1377void visit_type_MigrationInfoList(Visitor *m, MigrationInfoList ** obj, const char *name, Error **errp)
1378{
1379 GenericList *i, **prev = (GenericList **)obj;
1380 Error *err = NULL((void*)0);
1381
1382 if (!error_is_set(errp)) {
1383 visit_start_list(m, name, &err);
1384 if (!err) {
1385 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1386 MigrationInfoList *native_i = (MigrationInfoList *)i;
1387 visit_type_MigrationInfo(m, &native_i->value, NULL((void*)0), &err);
1388 }
1389 error_propagate(errp, err);
1390 err = NULL((void*)0);
1391
1392 /* Always call end_list if start_list succeeded. */
1393 visit_end_list(m, &err);
1394 }
1395 error_propagate(errp, err);
1396 }
1397}
1398
1399void visit_type_MigrationCapabilityList(Visitor *m, MigrationCapabilityList ** obj, const char *name, Error **errp)
1400{
1401 GenericList *i, **prev = (GenericList **)obj;
1402 Error *err = NULL((void*)0);
1403
1404 if (!error_is_set(errp)) {
1405 visit_start_list(m, name, &err);
1406 if (!err) {
1407 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1408 MigrationCapabilityList *native_i = (MigrationCapabilityList *)i;
1409 visit_type_MigrationCapability(m, &native_i->value, NULL((void*)0), &err);
1410 }
1411 error_propagate(errp, err);
1412 err = NULL((void*)0);
1413
1414 /* Always call end_list if start_list succeeded. */
1415 visit_end_list(m, &err);
1416 }
1417 error_propagate(errp, err);
1418 }
1419}
1420
1421void visit_type_MigrationCapability(Visitor *m, MigrationCapability * obj, const char *name, Error **errp)
1422{
1423 visit_type_enum(m, (int *)obj, MigrationCapability_lookup, "MigrationCapability", name, errp);
1424}
1425
1426static void visit_type_MigrationCapabilityStatus_fields(Visitor *m, MigrationCapabilityStatus ** obj, Error **errp)
1427{
1428 Error *err = NULL((void*)0);
1429 visit_type_MigrationCapability(m, obj ? &(*obj)->capability : NULL((void*)0), "capability", &err);
1430 visit_type_bool(m, obj ? &(*obj)->state : NULL((void*)0), "state", &err);
1431
1432 error_propagate(errp, err);
1433}
1434
1435void visit_type_MigrationCapabilityStatus(Visitor *m, MigrationCapabilityStatus ** obj, const char *name, Error **errp)
1436{
1437 if (!error_is_set(errp)) {
1438 Error *err = NULL((void*)0);
1439 visit_start_struct(m, (void **)obj, "MigrationCapabilityStatus", name, sizeof(MigrationCapabilityStatus), &err);
1440 if (!err) {
1441 if (!obj || *obj) {
1442 visit_type_MigrationCapabilityStatus_fields(m, obj, &err);
1443 error_propagate(errp, err);
1444 err = NULL((void*)0);
1445 }
1446 /* Always call end_struct if start_struct succeeded. */
1447 visit_end_struct(m, &err);
1448 }
1449 error_propagate(errp, err);
1450 }
1451}
1452
1453void visit_type_MigrationCapabilityStatusList(Visitor *m, MigrationCapabilityStatusList ** obj, const char *name, Error **errp)
1454{
1455 GenericList *i, **prev = (GenericList **)obj;
1456 Error *err = NULL((void*)0);
1457
1458 if (!error_is_set(errp)) {
1459 visit_start_list(m, name, &err);
1460 if (!err) {
1461 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1462 MigrationCapabilityStatusList *native_i = (MigrationCapabilityStatusList *)i;
1463 visit_type_MigrationCapabilityStatus(m, &native_i->value, NULL((void*)0), &err);
1464 }
1465 error_propagate(errp, err);
1466 err = NULL((void*)0);
1467
1468 /* Always call end_list if start_list succeeded. */
1469 visit_end_list(m, &err);
1470 }
1471 error_propagate(errp, err);
1472 }
1473}
1474
1475static void visit_type_MouseInfo_fields(Visitor *m, MouseInfo ** obj, Error **errp)
1476{
1477 Error *err = NULL((void*)0);
1478 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
1479 visit_type_int(m, obj ? &(*obj)->index : NULL((void*)0), "index", &err);
1480 visit_type_bool(m, obj ? &(*obj)->current : NULL((void*)0), "current", &err);
1481 visit_type_bool(m, obj ? &(*obj)->absolute : NULL((void*)0), "absolute", &err);
1482
1483 error_propagate(errp, err);
1484}
1485
1486void visit_type_MouseInfo(Visitor *m, MouseInfo ** obj, const char *name, Error **errp)
1487{
1488 if (!error_is_set(errp)) {
1489 Error *err = NULL((void*)0);
1490 visit_start_struct(m, (void **)obj, "MouseInfo", name, sizeof(MouseInfo), &err);
1491 if (!err) {
1492 if (!obj || *obj) {
1493 visit_type_MouseInfo_fields(m, obj, &err);
1494 error_propagate(errp, err);
1495 err = NULL((void*)0);
1496 }
1497 /* Always call end_struct if start_struct succeeded. */
1498 visit_end_struct(m, &err);
1499 }
1500 error_propagate(errp, err);
1501 }
1502}
1503
1504void visit_type_MouseInfoList(Visitor *m, MouseInfoList ** obj, const char *name, Error **errp)
1505{
1506 GenericList *i, **prev = (GenericList **)obj;
1507 Error *err = NULL((void*)0);
1508
1509 if (!error_is_set(errp)) {
1510 visit_start_list(m, name, &err);
1511 if (!err) {
1512 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1513 MouseInfoList *native_i = (MouseInfoList *)i;
1514 visit_type_MouseInfo(m, &native_i->value, NULL((void*)0), &err);
1515 }
1516 error_propagate(errp, err);
1517 err = NULL((void*)0);
1518
1519 /* Always call end_list if start_list succeeded. */
1520 visit_end_list(m, &err);
1521 }
1522 error_propagate(errp, err);
1523 }
1524}
1525
1526static void visit_type_CpuInfo_fields(Visitor *m, CpuInfo ** obj, Error **errp)
1527{
1528 Error *err = NULL((void*)0);
1529 visit_type_int(m, obj ? &(*obj)->CPU : NULL((void*)0), "CPU", &err);
1530 visit_type_bool(m, obj ? &(*obj)->current : NULL((void*)0), "current", &err);
1531 visit_type_bool(m, obj ? &(*obj)->halted : NULL((void*)0), "halted", &err);
1532 visit_start_optional(m, obj ? &(*obj)->has_pc : NULL((void*)0), "pc", &err);
1533 if (obj && (*obj)->has_pc) {
1534 visit_type_int(m, obj ? &(*obj)->pc : NULL((void*)0), "pc", &err);
1535 }
1536 visit_end_optional(m, &err);
1537 visit_start_optional(m, obj ? &(*obj)->has_nip : NULL((void*)0), "nip", &err);
1538 if (obj && (*obj)->has_nip) {
1539 visit_type_int(m, obj ? &(*obj)->nip : NULL((void*)0), "nip", &err);
1540 }
1541 visit_end_optional(m, &err);
1542 visit_start_optional(m, obj ? &(*obj)->has_npc : NULL((void*)0), "npc", &err);
1543 if (obj && (*obj)->has_npc) {
1544 visit_type_int(m, obj ? &(*obj)->npc : NULL((void*)0), "npc", &err);
1545 }
1546 visit_end_optional(m, &err);
1547 visit_start_optional(m, obj ? &(*obj)->has_PC : NULL((void*)0), "PC", &err);
1548 if (obj && (*obj)->has_PC) {
1549 visit_type_int(m, obj ? &(*obj)->PC : NULL((void*)0), "PC", &err);
1550 }
1551 visit_end_optional(m, &err);
1552 visit_type_int(m, obj ? &(*obj)->thread_id : NULL((void*)0), "thread_id", &err);
1553
1554 error_propagate(errp, err);
1555}
1556
1557void visit_type_CpuInfo(Visitor *m, CpuInfo ** obj, const char *name, Error **errp)
1558{
1559 if (!error_is_set(errp)) {
1560 Error *err = NULL((void*)0);
1561 visit_start_struct(m, (void **)obj, "CpuInfo", name, sizeof(CpuInfo), &err);
1562 if (!err) {
1563 if (!obj || *obj) {
1564 visit_type_CpuInfo_fields(m, obj, &err);
1565 error_propagate(errp, err);
1566 err = NULL((void*)0);
1567 }
1568 /* Always call end_struct if start_struct succeeded. */
1569 visit_end_struct(m, &err);
1570 }
1571 error_propagate(errp, err);
1572 }
1573}
1574
1575void visit_type_CpuInfoList(Visitor *m, CpuInfoList ** obj, const char *name, Error **errp)
1576{
1577 GenericList *i, **prev = (GenericList **)obj;
1578 Error *err = NULL((void*)0);
1579
1580 if (!error_is_set(errp)) {
1581 visit_start_list(m, name, &err);
1582 if (!err) {
1583 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1584 CpuInfoList *native_i = (CpuInfoList *)i;
1585 visit_type_CpuInfo(m, &native_i->value, NULL((void*)0), &err);
1586 }
1587 error_propagate(errp, err);
1588 err = NULL((void*)0);
1589
1590 /* Always call end_list if start_list succeeded. */
1591 visit_end_list(m, &err);
1592 }
1593 error_propagate(errp, err);
1594 }
1595}
1596
1597static void visit_type_BlockDeviceInfo_fields(Visitor *m, BlockDeviceInfo ** obj, Error **errp)
1598{
1599 Error *err = NULL((void*)0);
1600 visit_type_str(m, obj ? &(*obj)->file : NULL((void*)0), "file", &err);
1601 visit_type_bool(m, obj ? &(*obj)->ro : NULL((void*)0), "ro", &err);
1602 visit_type_str(m, obj ? &(*obj)->drv : NULL((void*)0), "drv", &err);
1603 visit_start_optional(m, obj ? &(*obj)->has_backing_file : NULL((void*)0), "backing_file", &err);
1604 if (obj && (*obj)->has_backing_file) {
1605 visit_type_str(m, obj ? &(*obj)->backing_file : NULL((void*)0), "backing_file", &err);
1606 }
1607 visit_end_optional(m, &err);
1608 visit_type_int(m, obj ? &(*obj)->backing_file_depth : NULL((void*)0), "backing_file_depth", &err);
1609 visit_type_bool(m, obj ? &(*obj)->encrypted : NULL((void*)0), "encrypted", &err);
1610 visit_type_bool(m, obj ? &(*obj)->encryption_key_missing : NULL((void*)0), "encryption_key_missing", &err);
1611 visit_type_int(m, obj ? &(*obj)->bps : NULL((void*)0), "bps", &err);
1612 visit_type_int(m, obj ? &(*obj)->bps_rd : NULL((void*)0), "bps_rd", &err);
1613 visit_type_int(m, obj ? &(*obj)->bps_wr : NULL((void*)0), "bps_wr", &err);
1614 visit_type_int(m, obj ? &(*obj)->iops : NULL((void*)0), "iops", &err);
1615 visit_type_int(m, obj ? &(*obj)->iops_rd : NULL((void*)0), "iops_rd", &err);
1616 visit_type_int(m, obj ? &(*obj)->iops_wr : NULL((void*)0), "iops_wr", &err);
1617 visit_type_ImageInfo(m, obj ? &(*obj)->image : NULL((void*)0), "image", &err);
1618 visit_start_optional(m, obj ? &(*obj)->has_bps_max : NULL((void*)0), "bps_max", &err);
1619 if (obj && (*obj)->has_bps_max) {
1620 visit_type_int(m, obj ? &(*obj)->bps_max : NULL((void*)0), "bps_max", &err);
1621 }
1622 visit_end_optional(m, &err);
1623 visit_start_optional(m, obj ? &(*obj)->has_bps_rd_max : NULL((void*)0), "bps_rd_max", &err);
1624 if (obj && (*obj)->has_bps_rd_max) {
1625 visit_type_int(m, obj ? &(*obj)->bps_rd_max : NULL((void*)0), "bps_rd_max", &err);
1626 }
1627 visit_end_optional(m, &err);
1628 visit_start_optional(m, obj ? &(*obj)->has_bps_wr_max : NULL((void*)0), "bps_wr_max", &err);
1629 if (obj && (*obj)->has_bps_wr_max) {
1630 visit_type_int(m, obj ? &(*obj)->bps_wr_max : NULL((void*)0), "bps_wr_max", &err);
1631 }
1632 visit_end_optional(m, &err);
1633 visit_start_optional(m, obj ? &(*obj)->has_iops_max : NULL((void*)0), "iops_max", &err);
1634 if (obj && (*obj)->has_iops_max) {
1635 visit_type_int(m, obj ? &(*obj)->iops_max : NULL((void*)0), "iops_max", &err);
1636 }
1637 visit_end_optional(m, &err);
1638 visit_start_optional(m, obj ? &(*obj)->has_iops_rd_max : NULL((void*)0), "iops_rd_max", &err);
1639 if (obj && (*obj)->has_iops_rd_max) {
1640 visit_type_int(m, obj ? &(*obj)->iops_rd_max : NULL((void*)0), "iops_rd_max", &err);
1641 }
1642 visit_end_optional(m, &err);
1643 visit_start_optional(m, obj ? &(*obj)->has_iops_wr_max : NULL((void*)0), "iops_wr_max", &err);
1644 if (obj && (*obj)->has_iops_wr_max) {
1645 visit_type_int(m, obj ? &(*obj)->iops_wr_max : NULL((void*)0), "iops_wr_max", &err);
1646 }
1647 visit_end_optional(m, &err);
1648 visit_start_optional(m, obj ? &(*obj)->has_iops_size : NULL((void*)0), "iops_size", &err);
1649 if (obj && (*obj)->has_iops_size) {
1650 visit_type_int(m, obj ? &(*obj)->iops_size : NULL((void*)0), "iops_size", &err);
1651 }
1652 visit_end_optional(m, &err);
1653
1654 error_propagate(errp, err);
1655}
1656
1657void visit_type_BlockDeviceInfo(Visitor *m, BlockDeviceInfo ** obj, const char *name, Error **errp)
1658{
1659 if (!error_is_set(errp)) {
1660 Error *err = NULL((void*)0);
1661 visit_start_struct(m, (void **)obj, "BlockDeviceInfo", name, sizeof(BlockDeviceInfo), &err);
1662 if (!err) {
1663 if (!obj || *obj) {
1664 visit_type_BlockDeviceInfo_fields(m, obj, &err);
1665 error_propagate(errp, err);
1666 err = NULL((void*)0);
1667 }
1668 /* Always call end_struct if start_struct succeeded. */
1669 visit_end_struct(m, &err);
1670 }
1671 error_propagate(errp, err);
1672 }
1673}
1674
1675void visit_type_BlockDeviceInfoList(Visitor *m, BlockDeviceInfoList ** obj, const char *name, Error **errp)
1676{
1677 GenericList *i, **prev = (GenericList **)obj;
1678 Error *err = NULL((void*)0);
1679
1680 if (!error_is_set(errp)) {
1681 visit_start_list(m, name, &err);
1682 if (!err) {
1683 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1684 BlockDeviceInfoList *native_i = (BlockDeviceInfoList *)i;
1685 visit_type_BlockDeviceInfo(m, &native_i->value, NULL((void*)0), &err);
1686 }
1687 error_propagate(errp, err);
1688 err = NULL((void*)0);
1689
1690 /* Always call end_list if start_list succeeded. */
1691 visit_end_list(m, &err);
1692 }
1693 error_propagate(errp, err);
1694 }
1695}
1696
1697void visit_type_BlockDeviceIoStatusList(Visitor *m, BlockDeviceIoStatusList ** obj, const char *name, Error **errp)
1698{
1699 GenericList *i, **prev = (GenericList **)obj;
1700 Error *err = NULL((void*)0);
1701
1702 if (!error_is_set(errp)) {
1703 visit_start_list(m, name, &err);
1704 if (!err) {
1705 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1706 BlockDeviceIoStatusList *native_i = (BlockDeviceIoStatusList *)i;
1707 visit_type_BlockDeviceIoStatus(m, &native_i->value, NULL((void*)0), &err);
1708 }
1709 error_propagate(errp, err);
1710 err = NULL((void*)0);
1711
1712 /* Always call end_list if start_list succeeded. */
1713 visit_end_list(m, &err);
1714 }
1715 error_propagate(errp, err);
1716 }
1717}
1718
1719void visit_type_BlockDeviceIoStatus(Visitor *m, BlockDeviceIoStatus * obj, const char *name, Error **errp)
1720{
1721 visit_type_enum(m, (int *)obj, BlockDeviceIoStatus_lookup, "BlockDeviceIoStatus", name, errp);
1722}
1723
1724static void visit_type_BlockDeviceMapEntry_fields(Visitor *m, BlockDeviceMapEntry ** obj, Error **errp)
1725{
1726 Error *err = NULL((void*)0);
1727 visit_type_int(m, obj ? &(*obj)->start : NULL((void*)0), "start", &err);
1728 visit_type_int(m, obj ? &(*obj)->length : NULL((void*)0), "length", &err);
1729 visit_type_int(m, obj ? &(*obj)->depth : NULL((void*)0), "depth", &err);
1730 visit_type_bool(m, obj ? &(*obj)->zero : NULL((void*)0), "zero", &err);
1731 visit_type_bool(m, obj ? &(*obj)->data : NULL((void*)0), "data", &err);
1732 visit_start_optional(m, obj ? &(*obj)->has_offset : NULL((void*)0), "offset", &err);
1733 if (obj && (*obj)->has_offset) {
1734 visit_type_int(m, obj ? &(*obj)->offset : NULL((void*)0), "offset", &err);
1735 }
1736 visit_end_optional(m, &err);
1737
1738 error_propagate(errp, err);
1739}
1740
1741void visit_type_BlockDeviceMapEntry(Visitor *m, BlockDeviceMapEntry ** obj, const char *name, Error **errp)
1742{
1743 if (!error_is_set(errp)) {
1744 Error *err = NULL((void*)0);
1745 visit_start_struct(m, (void **)obj, "BlockDeviceMapEntry", name, sizeof(BlockDeviceMapEntry), &err);
1746 if (!err) {
1747 if (!obj || *obj) {
1748 visit_type_BlockDeviceMapEntry_fields(m, obj, &err);
1749 error_propagate(errp, err);
1750 err = NULL((void*)0);
1751 }
1752 /* Always call end_struct if start_struct succeeded. */
1753 visit_end_struct(m, &err);
1754 }
1755 error_propagate(errp, err);
1756 }
1757}
1758
1759void visit_type_BlockDeviceMapEntryList(Visitor *m, BlockDeviceMapEntryList ** obj, const char *name, Error **errp)
1760{
1761 GenericList *i, **prev = (GenericList **)obj;
1762 Error *err = NULL((void*)0);
1763
1764 if (!error_is_set(errp)) {
1765 visit_start_list(m, name, &err);
1766 if (!err) {
1767 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1768 BlockDeviceMapEntryList *native_i = (BlockDeviceMapEntryList *)i;
1769 visit_type_BlockDeviceMapEntry(m, &native_i->value, NULL((void*)0), &err);
1770 }
1771 error_propagate(errp, err);
1772 err = NULL((void*)0);
1773
1774 /* Always call end_list if start_list succeeded. */
1775 visit_end_list(m, &err);
1776 }
1777 error_propagate(errp, err);
1778 }
1779}
1780
1781static void visit_type_BlockDirtyInfo_fields(Visitor *m, BlockDirtyInfo ** obj, Error **errp)
1782{
1783 Error *err = NULL((void*)0);
1784 visit_type_int(m, obj ? &(*obj)->count : NULL((void*)0), "count", &err);
1785 visit_type_int(m, obj ? &(*obj)->granularity : NULL((void*)0), "granularity", &err);
1786
1787 error_propagate(errp, err);
1788}
1789
1790void visit_type_BlockDirtyInfo(Visitor *m, BlockDirtyInfo ** obj, const char *name, Error **errp)
1791{
1792 if (!error_is_set(errp)) {
1793 Error *err = NULL((void*)0);
1794 visit_start_struct(m, (void **)obj, "BlockDirtyInfo", name, sizeof(BlockDirtyInfo), &err);
1795 if (!err) {
1796 if (!obj || *obj) {
1797 visit_type_BlockDirtyInfo_fields(m, obj, &err);
1798 error_propagate(errp, err);
1799 err = NULL((void*)0);
1800 }
1801 /* Always call end_struct if start_struct succeeded. */
1802 visit_end_struct(m, &err);
1803 }
1804 error_propagate(errp, err);
1805 }
1806}
1807
1808void visit_type_BlockDirtyInfoList(Visitor *m, BlockDirtyInfoList ** obj, const char *name, Error **errp)
1809{
1810 GenericList *i, **prev = (GenericList **)obj;
1811 Error *err = NULL((void*)0);
1812
1813 if (!error_is_set(errp)) {
1814 visit_start_list(m, name, &err);
1815 if (!err) {
1816 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1817 BlockDirtyInfoList *native_i = (BlockDirtyInfoList *)i;
1818 visit_type_BlockDirtyInfo(m, &native_i->value, NULL((void*)0), &err);
1819 }
1820 error_propagate(errp, err);
1821 err = NULL((void*)0);
1822
1823 /* Always call end_list if start_list succeeded. */
1824 visit_end_list(m, &err);
1825 }
1826 error_propagate(errp, err);
1827 }
1828}
1829
1830static void visit_type_BlockInfo_fields(Visitor *m, BlockInfo ** obj, Error **errp)
1831{
1832 Error *err = NULL((void*)0);
1833 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
1834 visit_type_str(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
1835 visit_type_bool(m, obj ? &(*obj)->removable : NULL((void*)0), "removable", &err);
1836 visit_type_bool(m, obj ? &(*obj)->locked : NULL((void*)0), "locked", &err);
1837 visit_start_optional(m, obj ? &(*obj)->has_inserted : NULL((void*)0), "inserted", &err);
1838 if (obj && (*obj)->has_inserted) {
1839 visit_type_BlockDeviceInfo(m, obj ? &(*obj)->inserted : NULL((void*)0), "inserted", &err);
1840 }
1841 visit_end_optional(m, &err);
1842 visit_start_optional(m, obj ? &(*obj)->has_tray_open : NULL((void*)0), "tray_open", &err);
1843 if (obj && (*obj)->has_tray_open) {
1844 visit_type_bool(m, obj ? &(*obj)->tray_open : NULL((void*)0), "tray_open", &err);
1845 }
1846 visit_end_optional(m, &err);
1847 visit_start_optional(m, obj ? &(*obj)->has_io_status : NULL((void*)0), "io-status", &err);
1848 if (obj && (*obj)->has_io_status) {
1849 visit_type_BlockDeviceIoStatus(m, obj ? &(*obj)->io_status : NULL((void*)0), "io-status", &err);
1850 }
1851 visit_end_optional(m, &err);
1852 visit_start_optional(m, obj ? &(*obj)->has_dirty_bitmaps : NULL((void*)0), "dirty-bitmaps", &err);
1853 if (obj && (*obj)->has_dirty_bitmaps) {
1854 visit_type_BlockDirtyInfoList(m, obj ? &(*obj)->dirty_bitmaps : NULL((void*)0), "dirty-bitmaps", &err);
1855 }
1856 visit_end_optional(m, &err);
1857
1858 error_propagate(errp, err);
1859}
1860
1861void visit_type_BlockInfo(Visitor *m, BlockInfo ** obj, const char *name, Error **errp)
1862{
1863 if (!error_is_set(errp)) {
1864 Error *err = NULL((void*)0);
1865 visit_start_struct(m, (void **)obj, "BlockInfo", name, sizeof(BlockInfo), &err);
1866 if (!err) {
1867 if (!obj || *obj) {
1868 visit_type_BlockInfo_fields(m, obj, &err);
1869 error_propagate(errp, err);
1870 err = NULL((void*)0);
1871 }
1872 /* Always call end_struct if start_struct succeeded. */
1873 visit_end_struct(m, &err);
1874 }
1875 error_propagate(errp, err);
1876 }
1877}
1878
1879void visit_type_BlockInfoList(Visitor *m, BlockInfoList ** obj, const char *name, Error **errp)
1880{
1881 GenericList *i, **prev = (GenericList **)obj;
1882 Error *err = NULL((void*)0);
1883
1884 if (!error_is_set(errp)) {
1885 visit_start_list(m, name, &err);
1886 if (!err) {
1887 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1888 BlockInfoList *native_i = (BlockInfoList *)i;
1889 visit_type_BlockInfo(m, &native_i->value, NULL((void*)0), &err);
1890 }
1891 error_propagate(errp, err);
1892 err = NULL((void*)0);
1893
1894 /* Always call end_list if start_list succeeded. */
1895 visit_end_list(m, &err);
1896 }
1897 error_propagate(errp, err);
1898 }
1899}
1900
1901static void visit_type_BlockDeviceStats_fields(Visitor *m, BlockDeviceStats ** obj, Error **errp)
1902{
1903 Error *err = NULL((void*)0);
1904 visit_type_int(m, obj ? &(*obj)->rd_bytes : NULL((void*)0), "rd_bytes", &err);
1905 visit_type_int(m, obj ? &(*obj)->wr_bytes : NULL((void*)0), "wr_bytes", &err);
1906 visit_type_int(m, obj ? &(*obj)->rd_operations : NULL((void*)0), "rd_operations", &err);
1907 visit_type_int(m, obj ? &(*obj)->wr_operations : NULL((void*)0), "wr_operations", &err);
1908 visit_type_int(m, obj ? &(*obj)->flush_operations : NULL((void*)0), "flush_operations", &err);
1909 visit_type_int(m, obj ? &(*obj)->flush_total_time_ns : NULL((void*)0), "flush_total_time_ns", &err);
1910 visit_type_int(m, obj ? &(*obj)->wr_total_time_ns : NULL((void*)0), "wr_total_time_ns", &err);
1911 visit_type_int(m, obj ? &(*obj)->rd_total_time_ns : NULL((void*)0), "rd_total_time_ns", &err);
1912 visit_type_int(m, obj ? &(*obj)->wr_highest_offset : NULL((void*)0), "wr_highest_offset", &err);
1913
1914 error_propagate(errp, err);
1915}
1916
1917void visit_type_BlockDeviceStats(Visitor *m, BlockDeviceStats ** obj, const char *name, Error **errp)
1918{
1919 if (!error_is_set(errp)) {
1920 Error *err = NULL((void*)0);
1921 visit_start_struct(m, (void **)obj, "BlockDeviceStats", name, sizeof(BlockDeviceStats), &err);
1922 if (!err) {
1923 if (!obj || *obj) {
1924 visit_type_BlockDeviceStats_fields(m, obj, &err);
1925 error_propagate(errp, err);
1926 err = NULL((void*)0);
1927 }
1928 /* Always call end_struct if start_struct succeeded. */
1929 visit_end_struct(m, &err);
1930 }
1931 error_propagate(errp, err);
1932 }
1933}
1934
1935void visit_type_BlockDeviceStatsList(Visitor *m, BlockDeviceStatsList ** obj, const char *name, Error **errp)
1936{
1937 GenericList *i, **prev = (GenericList **)obj;
1938 Error *err = NULL((void*)0);
1939
1940 if (!error_is_set(errp)) {
1941 visit_start_list(m, name, &err);
1942 if (!err) {
1943 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
1944 BlockDeviceStatsList *native_i = (BlockDeviceStatsList *)i;
1945 visit_type_BlockDeviceStats(m, &native_i->value, NULL((void*)0), &err);
1946 }
1947 error_propagate(errp, err);
1948 err = NULL((void*)0);
1949
1950 /* Always call end_list if start_list succeeded. */
1951 visit_end_list(m, &err);
1952 }
1953 error_propagate(errp, err);
1954 }
1955}
1956
1957static void visit_type_BlockStats_fields(Visitor *m, BlockStats ** obj, Error **errp)
1958{
1959 Error *err = NULL((void*)0);
1960 visit_start_optional(m, obj ? &(*obj)->has_device : NULL((void*)0), "device", &err);
1961 if (obj && (*obj)->has_device) {
1962 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
1963 }
1964 visit_end_optional(m, &err);
1965 visit_type_BlockDeviceStats(m, obj ? &(*obj)->stats : NULL((void*)0), "stats", &err);
1966 visit_start_optional(m, obj ? &(*obj)->has_parent : NULL((void*)0), "parent", &err);
1967 if (obj && (*obj)->has_parent) {
1968 visit_type_BlockStats(m, obj ? &(*obj)->parent : NULL((void*)0), "parent", &err);
1969 }
1970 visit_end_optional(m, &err);
1971
1972 error_propagate(errp, err);
1973}
1974
1975void visit_type_BlockStats(Visitor *m, BlockStats ** obj, const char *name, Error **errp)
1976{
1977 if (!error_is_set(errp)) {
1978 Error *err = NULL((void*)0);
1979 visit_start_struct(m, (void **)obj, "BlockStats", name, sizeof(BlockStats), &err);
1980 if (!err) {
1981 if (!obj || *obj) {
1982 visit_type_BlockStats_fields(m, obj, &err);
1983 error_propagate(errp, err);
1984 err = NULL((void*)0);
1985 }
1986 /* Always call end_struct if start_struct succeeded. */
1987 visit_end_struct(m, &err);
1988 }
1989 error_propagate(errp, err);
1990 }
1991}
1992
1993void visit_type_BlockStatsList(Visitor *m, BlockStatsList ** obj, const char *name, Error **errp)
1994{
1995 GenericList *i, **prev = (GenericList **)obj;
1996 Error *err = NULL((void*)0);
1997
1998 if (!error_is_set(errp)) {
1999 visit_start_list(m, name, &err);
2000 if (!err) {
2001 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2002 BlockStatsList *native_i = (BlockStatsList *)i;
2003 visit_type_BlockStats(m, &native_i->value, NULL((void*)0), &err);
2004 }
2005 error_propagate(errp, err);
2006 err = NULL((void*)0);
2007
2008 /* Always call end_list if start_list succeeded. */
2009 visit_end_list(m, &err);
2010 }
2011 error_propagate(errp, err);
2012 }
2013}
2014
2015static void visit_type_VncClientInfo_fields(Visitor *m, VncClientInfo ** obj, Error **errp)
2016{
2017 Error *err = NULL((void*)0);
2018 visit_type_str(m, obj ? &(*obj)->host : NULL((void*)0), "host", &err);
2019 visit_type_str(m, obj ? &(*obj)->family : NULL((void*)0), "family", &err);
2020 visit_type_str(m, obj ? &(*obj)->service : NULL((void*)0), "service", &err);
2021 visit_start_optional(m, obj ? &(*obj)->has_x509_dname : NULL((void*)0), "x509_dname", &err);
2022 if (obj && (*obj)->has_x509_dname) {
2023 visit_type_str(m, obj ? &(*obj)->x509_dname : NULL((void*)0), "x509_dname", &err);
2024 }
2025 visit_end_optional(m, &err);
2026 visit_start_optional(m, obj ? &(*obj)->has_sasl_username : NULL((void*)0), "sasl_username", &err);
2027 if (obj && (*obj)->has_sasl_username) {
2028 visit_type_str(m, obj ? &(*obj)->sasl_username : NULL((void*)0), "sasl_username", &err);
2029 }
2030 visit_end_optional(m, &err);
2031
2032 error_propagate(errp, err);
2033}
2034
2035void visit_type_VncClientInfo(Visitor *m, VncClientInfo ** obj, const char *name, Error **errp)
2036{
2037 if (!error_is_set(errp)) {
2038 Error *err = NULL((void*)0);
2039 visit_start_struct(m, (void **)obj, "VncClientInfo", name, sizeof(VncClientInfo), &err);
2040 if (!err) {
2041 if (!obj || *obj) {
2042 visit_type_VncClientInfo_fields(m, obj, &err);
2043 error_propagate(errp, err);
2044 err = NULL((void*)0);
2045 }
2046 /* Always call end_struct if start_struct succeeded. */
2047 visit_end_struct(m, &err);
2048 }
2049 error_propagate(errp, err);
2050 }
2051}
2052
2053void visit_type_VncClientInfoList(Visitor *m, VncClientInfoList ** obj, const char *name, Error **errp)
2054{
2055 GenericList *i, **prev = (GenericList **)obj;
2056 Error *err = NULL((void*)0);
2057
2058 if (!error_is_set(errp)) {
2059 visit_start_list(m, name, &err);
2060 if (!err) {
2061 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2062 VncClientInfoList *native_i = (VncClientInfoList *)i;
2063 visit_type_VncClientInfo(m, &native_i->value, NULL((void*)0), &err);
2064 }
2065 error_propagate(errp, err);
2066 err = NULL((void*)0);
2067
2068 /* Always call end_list if start_list succeeded. */
2069 visit_end_list(m, &err);
2070 }
2071 error_propagate(errp, err);
2072 }
2073}
2074
2075static void visit_type_VncInfo_fields(Visitor *m, VncInfo ** obj, Error **errp)
2076{
2077 Error *err = NULL((void*)0);
2078 visit_type_bool(m, obj ? &(*obj)->enabled : NULL((void*)0), "enabled", &err);
2079 visit_start_optional(m, obj ? &(*obj)->has_host : NULL((void*)0), "host", &err);
2080 if (obj && (*obj)->has_host) {
2081 visit_type_str(m, obj ? &(*obj)->host : NULL((void*)0), "host", &err);
2082 }
2083 visit_end_optional(m, &err);
2084 visit_start_optional(m, obj ? &(*obj)->has_family : NULL((void*)0), "family", &err);
2085 if (obj && (*obj)->has_family) {
2086 visit_type_str(m, obj ? &(*obj)->family : NULL((void*)0), "family", &err);
2087 }
2088 visit_end_optional(m, &err);
2089 visit_start_optional(m, obj ? &(*obj)->has_service : NULL((void*)0), "service", &err);
2090 if (obj && (*obj)->has_service) {
2091 visit_type_str(m, obj ? &(*obj)->service : NULL((void*)0), "service", &err);
2092 }
2093 visit_end_optional(m, &err);
2094 visit_start_optional(m, obj ? &(*obj)->has_auth : NULL((void*)0), "auth", &err);
2095 if (obj && (*obj)->has_auth) {
2096 visit_type_str(m, obj ? &(*obj)->auth : NULL((void*)0), "auth", &err);
2097 }
2098 visit_end_optional(m, &err);
2099 visit_start_optional(m, obj ? &(*obj)->has_clients : NULL((void*)0), "clients", &err);
2100 if (obj && (*obj)->has_clients) {
2101 visit_type_VncClientInfoList(m, obj ? &(*obj)->clients : NULL((void*)0), "clients", &err);
2102 }
2103 visit_end_optional(m, &err);
2104
2105 error_propagate(errp, err);
2106}
2107
2108void visit_type_VncInfo(Visitor *m, VncInfo ** obj, const char *name, Error **errp)
2109{
2110 if (!error_is_set(errp)) {
2111 Error *err = NULL((void*)0);
2112 visit_start_struct(m, (void **)obj, "VncInfo", name, sizeof(VncInfo), &err);
2113 if (!err) {
2114 if (!obj || *obj) {
2115 visit_type_VncInfo_fields(m, obj, &err);
2116 error_propagate(errp, err);
2117 err = NULL((void*)0);
2118 }
2119 /* Always call end_struct if start_struct succeeded. */
2120 visit_end_struct(m, &err);
2121 }
2122 error_propagate(errp, err);
2123 }
2124}
2125
2126void visit_type_VncInfoList(Visitor *m, VncInfoList ** obj, const char *name, Error **errp)
2127{
2128 GenericList *i, **prev = (GenericList **)obj;
2129 Error *err = NULL((void*)0);
2130
2131 if (!error_is_set(errp)) {
2132 visit_start_list(m, name, &err);
2133 if (!err) {
2134 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2135 VncInfoList *native_i = (VncInfoList *)i;
2136 visit_type_VncInfo(m, &native_i->value, NULL((void*)0), &err);
2137 }
2138 error_propagate(errp, err);
2139 err = NULL((void*)0);
2140
2141 /* Always call end_list if start_list succeeded. */
2142 visit_end_list(m, &err);
2143 }
2144 error_propagate(errp, err);
2145 }
2146}
2147
2148static void visit_type_SpiceChannel_fields(Visitor *m, SpiceChannel ** obj, Error **errp)
2149{
2150 Error *err = NULL((void*)0);
2151 visit_type_str(m, obj ? &(*obj)->host : NULL((void*)0), "host", &err);
2152 visit_type_str(m, obj ? &(*obj)->family : NULL((void*)0), "family", &err);
2153 visit_type_str(m, obj ? &(*obj)->port : NULL((void*)0), "port", &err);
2154 visit_type_int(m, obj ? &(*obj)->connection_id : NULL((void*)0), "connection-id", &err);
2155 visit_type_int(m, obj ? &(*obj)->channel_type : NULL((void*)0), "channel-type", &err);
2156 visit_type_int(m, obj ? &(*obj)->channel_id : NULL((void*)0), "channel-id", &err);
2157 visit_type_bool(m, obj ? &(*obj)->tls : NULL((void*)0), "tls", &err);
2158
2159 error_propagate(errp, err);
2160}
2161
2162void visit_type_SpiceChannel(Visitor *m, SpiceChannel ** obj, const char *name, Error **errp)
2163{
2164 if (!error_is_set(errp)) {
2165 Error *err = NULL((void*)0);
2166 visit_start_struct(m, (void **)obj, "SpiceChannel", name, sizeof(SpiceChannel), &err);
2167 if (!err) {
2168 if (!obj || *obj) {
2169 visit_type_SpiceChannel_fields(m, obj, &err);
2170 error_propagate(errp, err);
2171 err = NULL((void*)0);
2172 }
2173 /* Always call end_struct if start_struct succeeded. */
2174 visit_end_struct(m, &err);
2175 }
2176 error_propagate(errp, err);
2177 }
2178}
2179
2180void visit_type_SpiceChannelList(Visitor *m, SpiceChannelList ** obj, const char *name, Error **errp)
2181{
2182 GenericList *i, **prev = (GenericList **)obj;
2183 Error *err = NULL((void*)0);
2184
2185 if (!error_is_set(errp)) {
2186 visit_start_list(m, name, &err);
2187 if (!err) {
2188 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2189 SpiceChannelList *native_i = (SpiceChannelList *)i;
2190 visit_type_SpiceChannel(m, &native_i->value, NULL((void*)0), &err);
2191 }
2192 error_propagate(errp, err);
2193 err = NULL((void*)0);
2194
2195 /* Always call end_list if start_list succeeded. */
2196 visit_end_list(m, &err);
2197 }
2198 error_propagate(errp, err);
2199 }
2200}
2201
2202void visit_type_SpiceQueryMouseModeList(Visitor *m, SpiceQueryMouseModeList ** obj, const char *name, Error **errp)
2203{
2204 GenericList *i, **prev = (GenericList **)obj;
2205 Error *err = NULL((void*)0);
2206
2207 if (!error_is_set(errp)) {
2208 visit_start_list(m, name, &err);
2209 if (!err) {
2210 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2211 SpiceQueryMouseModeList *native_i = (SpiceQueryMouseModeList *)i;
2212 visit_type_SpiceQueryMouseMode(m, &native_i->value, NULL((void*)0), &err);
2213 }
2214 error_propagate(errp, err);
2215 err = NULL((void*)0);
2216
2217 /* Always call end_list if start_list succeeded. */
2218 visit_end_list(m, &err);
2219 }
2220 error_propagate(errp, err);
2221 }
2222}
2223
2224void visit_type_SpiceQueryMouseMode(Visitor *m, SpiceQueryMouseMode * obj, const char *name, Error **errp)
2225{
2226 visit_type_enum(m, (int *)obj, SpiceQueryMouseMode_lookup, "SpiceQueryMouseMode", name, errp);
2227}
2228
2229static void visit_type_SpiceInfo_fields(Visitor *m, SpiceInfo ** obj, Error **errp)
2230{
2231 Error *err = NULL((void*)0);
2232 visit_type_bool(m, obj ? &(*obj)->enabled : NULL((void*)0), "enabled", &err);
2233 visit_type_bool(m, obj ? &(*obj)->migrated : NULL((void*)0), "migrated", &err);
2234 visit_start_optional(m, obj ? &(*obj)->has_host : NULL((void*)0), "host", &err);
2235 if (obj && (*obj)->has_host) {
2236 visit_type_str(m, obj ? &(*obj)->host : NULL((void*)0), "host", &err);
2237 }
2238 visit_end_optional(m, &err);
2239 visit_start_optional(m, obj ? &(*obj)->has_port : NULL((void*)0), "port", &err);
2240 if (obj && (*obj)->has_port) {
2241 visit_type_int(m, obj ? &(*obj)->port : NULL((void*)0), "port", &err);
2242 }
2243 visit_end_optional(m, &err);
2244 visit_start_optional(m, obj ? &(*obj)->has_tls_port : NULL((void*)0), "tls-port", &err);
2245 if (obj && (*obj)->has_tls_port) {
2246 visit_type_int(m, obj ? &(*obj)->tls_port : NULL((void*)0), "tls-port", &err);
2247 }
2248 visit_end_optional(m, &err);
2249 visit_start_optional(m, obj ? &(*obj)->has_auth : NULL((void*)0), "auth", &err);
2250 if (obj && (*obj)->has_auth) {
2251 visit_type_str(m, obj ? &(*obj)->auth : NULL((void*)0), "auth", &err);
2252 }
2253 visit_end_optional(m, &err);
2254 visit_start_optional(m, obj ? &(*obj)->has_compiled_version : NULL((void*)0), "compiled-version", &err);
2255 if (obj && (*obj)->has_compiled_version) {
2256 visit_type_str(m, obj ? &(*obj)->compiled_version : NULL((void*)0), "compiled-version", &err);
2257 }
2258 visit_end_optional(m, &err);
2259 visit_type_SpiceQueryMouseMode(m, obj ? &(*obj)->mouse_mode : NULL((void*)0), "mouse-mode", &err);
2260 visit_start_optional(m, obj ? &(*obj)->has_channels : NULL((void*)0), "channels", &err);
2261 if (obj && (*obj)->has_channels) {
2262 visit_type_SpiceChannelList(m, obj ? &(*obj)->channels : NULL((void*)0), "channels", &err);
2263 }
2264 visit_end_optional(m, &err);
2265
2266 error_propagate(errp, err);
2267}
2268
2269void visit_type_SpiceInfo(Visitor *m, SpiceInfo ** obj, const char *name, Error **errp)
2270{
2271 if (!error_is_set(errp)) {
2272 Error *err = NULL((void*)0);
2273 visit_start_struct(m, (void **)obj, "SpiceInfo", name, sizeof(SpiceInfo), &err);
2274 if (!err) {
2275 if (!obj || *obj) {
2276 visit_type_SpiceInfo_fields(m, obj, &err);
2277 error_propagate(errp, err);
2278 err = NULL((void*)0);
2279 }
2280 /* Always call end_struct if start_struct succeeded. */
2281 visit_end_struct(m, &err);
2282 }
2283 error_propagate(errp, err);
2284 }
2285}
2286
2287void visit_type_SpiceInfoList(Visitor *m, SpiceInfoList ** obj, const char *name, Error **errp)
2288{
2289 GenericList *i, **prev = (GenericList **)obj;
2290 Error *err = NULL((void*)0);
2291
2292 if (!error_is_set(errp)) {
2293 visit_start_list(m, name, &err);
2294 if (!err) {
2295 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2296 SpiceInfoList *native_i = (SpiceInfoList *)i;
2297 visit_type_SpiceInfo(m, &native_i->value, NULL((void*)0), &err);
2298 }
2299 error_propagate(errp, err);
2300 err = NULL((void*)0);
2301
2302 /* Always call end_list if start_list succeeded. */
2303 visit_end_list(m, &err);
2304 }
2305 error_propagate(errp, err);
2306 }
2307}
2308
2309static void visit_type_BalloonInfo_fields(Visitor *m, BalloonInfo ** obj, Error **errp)
2310{
2311 Error *err = NULL((void*)0);
2312 visit_type_int(m, obj ? &(*obj)->actual : NULL((void*)0), "actual", &err);
2313
2314 error_propagate(errp, err);
2315}
2316
2317void visit_type_BalloonInfo(Visitor *m, BalloonInfo ** obj, const char *name, Error **errp)
2318{
2319 if (!error_is_set(errp)) {
2320 Error *err = NULL((void*)0);
2321 visit_start_struct(m, (void **)obj, "BalloonInfo", name, sizeof(BalloonInfo), &err);
2322 if (!err) {
2323 if (!obj || *obj) {
2324 visit_type_BalloonInfo_fields(m, obj, &err);
2325 error_propagate(errp, err);
2326 err = NULL((void*)0);
2327 }
2328 /* Always call end_struct if start_struct succeeded. */
2329 visit_end_struct(m, &err);
2330 }
2331 error_propagate(errp, err);
2332 }
2333}
2334
2335void visit_type_BalloonInfoList(Visitor *m, BalloonInfoList ** obj, const char *name, Error **errp)
2336{
2337 GenericList *i, **prev = (GenericList **)obj;
2338 Error *err = NULL((void*)0);
2339
2340 if (!error_is_set(errp)) {
2341 visit_start_list(m, name, &err);
2342 if (!err) {
2343 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2344 BalloonInfoList *native_i = (BalloonInfoList *)i;
2345 visit_type_BalloonInfo(m, &native_i->value, NULL((void*)0), &err);
2346 }
2347 error_propagate(errp, err);
2348 err = NULL((void*)0);
2349
2350 /* Always call end_list if start_list succeeded. */
2351 visit_end_list(m, &err);
2352 }
2353 error_propagate(errp, err);
2354 }
2355}
2356
2357static void visit_type_PciMemoryRange_fields(Visitor *m, PciMemoryRange ** obj, Error **errp)
2358{
2359 Error *err = NULL((void*)0);
2360 visit_type_int(m, obj ? &(*obj)->base : NULL((void*)0), "base", &err);
2361 visit_type_int(m, obj ? &(*obj)->limit : NULL((void*)0), "limit", &err);
2362
2363 error_propagate(errp, err);
2364}
2365
2366void visit_type_PciMemoryRange(Visitor *m, PciMemoryRange ** obj, const char *name, Error **errp)
2367{
2368 if (!error_is_set(errp)) {
2369 Error *err = NULL((void*)0);
2370 visit_start_struct(m, (void **)obj, "PciMemoryRange", name, sizeof(PciMemoryRange), &err);
2371 if (!err) {
2372 if (!obj || *obj) {
2373 visit_type_PciMemoryRange_fields(m, obj, &err);
2374 error_propagate(errp, err);
2375 err = NULL((void*)0);
2376 }
2377 /* Always call end_struct if start_struct succeeded. */
2378 visit_end_struct(m, &err);
2379 }
2380 error_propagate(errp, err);
2381 }
2382}
2383
2384void visit_type_PciMemoryRangeList(Visitor *m, PciMemoryRangeList ** obj, const char *name, Error **errp)
2385{
2386 GenericList *i, **prev = (GenericList **)obj;
2387 Error *err = NULL((void*)0);
2388
2389 if (!error_is_set(errp)) {
2390 visit_start_list(m, name, &err);
2391 if (!err) {
2392 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2393 PciMemoryRangeList *native_i = (PciMemoryRangeList *)i;
2394 visit_type_PciMemoryRange(m, &native_i->value, NULL((void*)0), &err);
2395 }
2396 error_propagate(errp, err);
2397 err = NULL((void*)0);
2398
2399 /* Always call end_list if start_list succeeded. */
2400 visit_end_list(m, &err);
2401 }
2402 error_propagate(errp, err);
2403 }
2404}
2405
2406static void visit_type_PciMemoryRegion_fields(Visitor *m, PciMemoryRegion ** obj, Error **errp)
2407{
2408 Error *err = NULL((void*)0);
2409 visit_type_int(m, obj ? &(*obj)->bar : NULL((void*)0), "bar", &err);
2410 visit_type_str(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
2411 visit_type_int(m, obj ? &(*obj)->address : NULL((void*)0), "address", &err);
2412 visit_type_int(m, obj ? &(*obj)->size : NULL((void*)0), "size", &err);
2413 visit_start_optional(m, obj ? &(*obj)->has_prefetch : NULL((void*)0), "prefetch", &err);
2414 if (obj && (*obj)->has_prefetch) {
2415 visit_type_bool(m, obj ? &(*obj)->prefetch : NULL((void*)0), "prefetch", &err);
2416 }
2417 visit_end_optional(m, &err);
2418 visit_start_optional(m, obj ? &(*obj)->has_mem_type_64 : NULL((void*)0), "mem_type_64", &err);
2419 if (obj && (*obj)->has_mem_type_64) {
2420 visit_type_bool(m, obj ? &(*obj)->mem_type_64 : NULL((void*)0), "mem_type_64", &err);
2421 }
2422 visit_end_optional(m, &err);
2423
2424 error_propagate(errp, err);
2425}
2426
2427void visit_type_PciMemoryRegion(Visitor *m, PciMemoryRegion ** obj, const char *name, Error **errp)
2428{
2429 if (!error_is_set(errp)) {
2430 Error *err = NULL((void*)0);
2431 visit_start_struct(m, (void **)obj, "PciMemoryRegion", name, sizeof(PciMemoryRegion), &err);
2432 if (!err) {
2433 if (!obj || *obj) {
2434 visit_type_PciMemoryRegion_fields(m, obj, &err);
2435 error_propagate(errp, err);
2436 err = NULL((void*)0);
2437 }
2438 /* Always call end_struct if start_struct succeeded. */
2439 visit_end_struct(m, &err);
2440 }
2441 error_propagate(errp, err);
2442 }
2443}
2444
2445void visit_type_PciMemoryRegionList(Visitor *m, PciMemoryRegionList ** obj, const char *name, Error **errp)
2446{
2447 GenericList *i, **prev = (GenericList **)obj;
2448 Error *err = NULL((void*)0);
2449
2450 if (!error_is_set(errp)) {
2451 visit_start_list(m, name, &err);
2452 if (!err) {
2453 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2454 PciMemoryRegionList *native_i = (PciMemoryRegionList *)i;
2455 visit_type_PciMemoryRegion(m, &native_i->value, NULL((void*)0), &err);
2456 }
2457 error_propagate(errp, err);
2458 err = NULL((void*)0);
2459
2460 /* Always call end_list if start_list succeeded. */
2461 visit_end_list(m, &err);
2462 }
2463 error_propagate(errp, err);
2464 }
2465}
2466
2467static void visit_type_PciBridgeInfo_bus_fields(Visitor *m, PciBridgeInfo ** obj, Error **errp)
2468{
2469 Error *err = NULL((void*)0);
2470 visit_type_int(m, obj ? &(*obj)->bus.number : NULL((void*)0), "number", &err);
2471 visit_type_int(m, obj ? &(*obj)->bus.secondary : NULL((void*)0), "secondary", &err);
2472 visit_type_int(m, obj ? &(*obj)->bus.subordinate : NULL((void*)0), "subordinate", &err);
2473 visit_type_PciMemoryRange(m, obj ? &(*obj)->bus.io_range : NULL((void*)0), "io_range", &err);
2474 visit_type_PciMemoryRange(m, obj ? &(*obj)->bus.memory_range : NULL((void*)0), "memory_range", &err);
2475 visit_type_PciMemoryRange(m, obj ? &(*obj)->bus.prefetchable_range : NULL((void*)0), "prefetchable_range", &err);
2476
2477 error_propagate(errp, err);
2478}
2479
2480static void visit_type_PciBridgeInfo_fields(Visitor *m, PciBridgeInfo ** obj, Error **errp)
2481{
2482 Error *err = NULL((void*)0);
2483 if (!error_is_set(errp)) {
2484 Error **errp = &err; /* from outer scope */
2485 Error *err = NULL((void*)0);
2486 visit_start_struct(m, NULL((void*)0), "", "bus", 0, &err);
2487 if (!err) {
2488 if (!obj || *obj) {
2489 visit_type_PciBridgeInfo_bus_fields(m, obj, &err);
2490 error_propagate(errp, err);
2491 err = NULL((void*)0);
2492 }
2493 /* Always call end_struct if start_struct succeeded. */
2494 visit_end_struct(m, &err);
2495 }
2496 error_propagate(errp, err);
2497 }
2498 visit_start_optional(m, obj ? &(*obj)->has_devices : NULL((void*)0), "devices", &err);
2499 if (obj && (*obj)->has_devices) {
2500 visit_type_PciDeviceInfoList(m, obj ? &(*obj)->devices : NULL((void*)0), "devices", &err);
2501 }
2502 visit_end_optional(m, &err);
2503
2504 error_propagate(errp, err);
2505}
2506
2507void visit_type_PciBridgeInfo(Visitor *m, PciBridgeInfo ** obj, const char *name, Error **errp)
2508{
2509 if (!error_is_set(errp)) {
2510 Error *err = NULL((void*)0);
2511 visit_start_struct(m, (void **)obj, "PciBridgeInfo", name, sizeof(PciBridgeInfo), &err);
2512 if (!err) {
2513 if (!obj || *obj) {
2514 visit_type_PciBridgeInfo_fields(m, obj, &err);
2515 error_propagate(errp, err);
2516 err = NULL((void*)0);
2517 }
2518 /* Always call end_struct if start_struct succeeded. */
2519 visit_end_struct(m, &err);
2520 }
2521 error_propagate(errp, err);
2522 }
2523}
2524
2525void visit_type_PciBridgeInfoList(Visitor *m, PciBridgeInfoList ** obj, const char *name, Error **errp)
2526{
2527 GenericList *i, **prev = (GenericList **)obj;
2528 Error *err = NULL((void*)0);
2529
2530 if (!error_is_set(errp)) {
2531 visit_start_list(m, name, &err);
2532 if (!err) {
2533 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2534 PciBridgeInfoList *native_i = (PciBridgeInfoList *)i;
2535 visit_type_PciBridgeInfo(m, &native_i->value, NULL((void*)0), &err);
2536 }
2537 error_propagate(errp, err);
2538 err = NULL((void*)0);
2539
2540 /* Always call end_list if start_list succeeded. */
2541 visit_end_list(m, &err);
2542 }
2543 error_propagate(errp, err);
2544 }
2545}
2546
2547static void visit_type_PciDeviceInfo_class_info_fields(Visitor *m, PciDeviceInfo ** obj, Error **errp)
2548{
2549 Error *err = NULL((void*)0);
2550 visit_start_optional(m, obj ? &(*obj)->class_info.has_desc : NULL((void*)0), "desc", &err);
2551 if (obj && (*obj)->class_info.has_desc) {
2552 visit_type_str(m, obj ? &(*obj)->class_info.desc : NULL((void*)0), "desc", &err);
2553 }
2554 visit_end_optional(m, &err);
2555 visit_type_int(m, obj ? &(*obj)->class_info.q_class : NULL((void*)0), "class", &err);
2556
2557 error_propagate(errp, err);
2558}
2559
2560static void visit_type_PciDeviceInfo_id_fields(Visitor *m, PciDeviceInfo ** obj, Error **errp)
2561{
2562 Error *err = NULL((void*)0);
2563 visit_type_int(m, obj ? &(*obj)->id.device : NULL((void*)0), "device", &err);
2564 visit_type_int(m, obj ? &(*obj)->id.vendor : NULL((void*)0), "vendor", &err);
2565
2566 error_propagate(errp, err);
2567}
2568
2569static void visit_type_PciDeviceInfo_fields(Visitor *m, PciDeviceInfo ** obj, Error **errp)
2570{
2571 Error *err = NULL((void*)0);
2572 visit_type_int(m, obj ? &(*obj)->bus : NULL((void*)0), "bus", &err);
1
Assuming 'obj' is non-null
2
'?' condition is true
2573 visit_type_int(m, obj ? &(*obj)->slot : NULL((void*)0), "slot", &err);
3
'?' condition is true
2574 visit_type_int(m, obj ? &(*obj)->function : NULL((void*)0), "function", &err);
4
'?' condition is true
2575 if (!error_is_set(errp)) {
5
Taking false branch
2576 Error **errp = &err; /* from outer scope */
2577 Error *err = NULL((void*)0);
2578 visit_start_struct(m, NULL((void*)0), "", "class_info", 0, &err);
2579 if (!err) {
2580 if (!obj || *obj) {
2581 visit_type_PciDeviceInfo_class_info_fields(m, obj, &err);
2582 error_propagate(errp, err);
2583 err = NULL((void*)0);
2584 }
2585 /* Always call end_struct if start_struct succeeded. */
2586 visit_end_struct(m, &err);
2587 }
2588 error_propagate(errp, err);
2589 }
2590 if (!error_is_set(errp)) {
6
Taking true branch
2591 Error **errp = &err; /* from outer scope */
2592 Error *err = NULL((void*)0);
2593 visit_start_struct(m, NULL((void*)0), "", "id", 0, &err);
2594 if (!err) {
7
Assuming 'err' is null
8
Taking true branch
2595 if (!obj || *obj) {
9
Assuming pointer value is null
10
Taking false branch
2596 visit_type_PciDeviceInfo_id_fields(m, obj, &err);
2597 error_propagate(errp, err);
2598 err = NULL((void*)0);
2599 }
2600 /* Always call end_struct if start_struct succeeded. */
2601 visit_end_struct(m, &err);
2602 }
2603 error_propagate(errp, err);
2604 }
2605 visit_start_optional(m, obj ? &(*obj)->has_irq : NULL((void*)0), "irq", &err);
11
'?' condition is true
2606 if (obj && (*obj)->has_irq) {
12
Access to field 'has_irq' results in a dereference of a null pointer
2607 visit_type_int(m, obj ? &(*obj)->irq : NULL((void*)0), "irq", &err);
2608 }
2609 visit_end_optional(m, &err);
2610 visit_type_str(m, obj ? &(*obj)->qdev_id : NULL((void*)0), "qdev_id", &err);
2611 visit_start_optional(m, obj ? &(*obj)->has_pci_bridge : NULL((void*)0), "pci_bridge", &err);
2612 if (obj && (*obj)->has_pci_bridge) {
2613 visit_type_PciBridgeInfo(m, obj ? &(*obj)->pci_bridge : NULL((void*)0), "pci_bridge", &err);
2614 }
2615 visit_end_optional(m, &err);
2616 visit_type_PciMemoryRegionList(m, obj ? &(*obj)->regions : NULL((void*)0), "regions", &err);
2617
2618 error_propagate(errp, err);
2619}
2620
2621void visit_type_PciDeviceInfo(Visitor *m, PciDeviceInfo ** obj, const char *name, Error **errp)
2622{
2623 if (!error_is_set(errp)) {
2624 Error *err = NULL((void*)0);
2625 visit_start_struct(m, (void **)obj, "PciDeviceInfo", name, sizeof(PciDeviceInfo), &err);
2626 if (!err) {
2627 if (!obj || *obj) {
2628 visit_type_PciDeviceInfo_fields(m, obj, &err);
2629 error_propagate(errp, err);
2630 err = NULL((void*)0);
2631 }
2632 /* Always call end_struct if start_struct succeeded. */
2633 visit_end_struct(m, &err);
2634 }
2635 error_propagate(errp, err);
2636 }
2637}
2638
2639void visit_type_PciDeviceInfoList(Visitor *m, PciDeviceInfoList ** obj, const char *name, Error **errp)
2640{
2641 GenericList *i, **prev = (GenericList **)obj;
2642 Error *err = NULL((void*)0);
2643
2644 if (!error_is_set(errp)) {
2645 visit_start_list(m, name, &err);
2646 if (!err) {
2647 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2648 PciDeviceInfoList *native_i = (PciDeviceInfoList *)i;
2649 visit_type_PciDeviceInfo(m, &native_i->value, NULL((void*)0), &err);
2650 }
2651 error_propagate(errp, err);
2652 err = NULL((void*)0);
2653
2654 /* Always call end_list if start_list succeeded. */
2655 visit_end_list(m, &err);
2656 }
2657 error_propagate(errp, err);
2658 }
2659}
2660
2661static void visit_type_PciInfo_fields(Visitor *m, PciInfo ** obj, Error **errp)
2662{
2663 Error *err = NULL((void*)0);
2664 visit_type_int(m, obj ? &(*obj)->bus : NULL((void*)0), "bus", &err);
2665 visit_type_PciDeviceInfoList(m, obj ? &(*obj)->devices : NULL((void*)0), "devices", &err);
2666
2667 error_propagate(errp, err);
2668}
2669
2670void visit_type_PciInfo(Visitor *m, PciInfo ** obj, const char *name, Error **errp)
2671{
2672 if (!error_is_set(errp)) {
2673 Error *err = NULL((void*)0);
2674 visit_start_struct(m, (void **)obj, "PciInfo", name, sizeof(PciInfo), &err);
2675 if (!err) {
2676 if (!obj || *obj) {
2677 visit_type_PciInfo_fields(m, obj, &err);
2678 error_propagate(errp, err);
2679 err = NULL((void*)0);
2680 }
2681 /* Always call end_struct if start_struct succeeded. */
2682 visit_end_struct(m, &err);
2683 }
2684 error_propagate(errp, err);
2685 }
2686}
2687
2688void visit_type_PciInfoList(Visitor *m, PciInfoList ** obj, const char *name, Error **errp)
2689{
2690 GenericList *i, **prev = (GenericList **)obj;
2691 Error *err = NULL((void*)0);
2692
2693 if (!error_is_set(errp)) {
2694 visit_start_list(m, name, &err);
2695 if (!err) {
2696 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2697 PciInfoList *native_i = (PciInfoList *)i;
2698 visit_type_PciInfo(m, &native_i->value, NULL((void*)0), &err);
2699 }
2700 error_propagate(errp, err);
2701 err = NULL((void*)0);
2702
2703 /* Always call end_list if start_list succeeded. */
2704 visit_end_list(m, &err);
2705 }
2706 error_propagate(errp, err);
2707 }
2708}
2709
2710void visit_type_BlockdevOnErrorList(Visitor *m, BlockdevOnErrorList ** obj, const char *name, Error **errp)
2711{
2712 GenericList *i, **prev = (GenericList **)obj;
2713 Error *err = NULL((void*)0);
2714
2715 if (!error_is_set(errp)) {
2716 visit_start_list(m, name, &err);
2717 if (!err) {
2718 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2719 BlockdevOnErrorList *native_i = (BlockdevOnErrorList *)i;
2720 visit_type_BlockdevOnError(m, &native_i->value, NULL((void*)0), &err);
2721 }
2722 error_propagate(errp, err);
2723 err = NULL((void*)0);
2724
2725 /* Always call end_list if start_list succeeded. */
2726 visit_end_list(m, &err);
2727 }
2728 error_propagate(errp, err);
2729 }
2730}
2731
2732void visit_type_BlockdevOnError(Visitor *m, BlockdevOnError * obj, const char *name, Error **errp)
2733{
2734 visit_type_enum(m, (int *)obj, BlockdevOnError_lookup, "BlockdevOnError", name, errp);
2735}
2736
2737void visit_type_MirrorSyncModeList(Visitor *m, MirrorSyncModeList ** obj, const char *name, Error **errp)
2738{
2739 GenericList *i, **prev = (GenericList **)obj;
2740 Error *err = NULL((void*)0);
2741
2742 if (!error_is_set(errp)) {
2743 visit_start_list(m, name, &err);
2744 if (!err) {
2745 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2746 MirrorSyncModeList *native_i = (MirrorSyncModeList *)i;
2747 visit_type_MirrorSyncMode(m, &native_i->value, NULL((void*)0), &err);
2748 }
2749 error_propagate(errp, err);
2750 err = NULL((void*)0);
2751
2752 /* Always call end_list if start_list succeeded. */
2753 visit_end_list(m, &err);
2754 }
2755 error_propagate(errp, err);
2756 }
2757}
2758
2759void visit_type_MirrorSyncMode(Visitor *m, MirrorSyncMode * obj, const char *name, Error **errp)
2760{
2761 visit_type_enum(m, (int *)obj, MirrorSyncMode_lookup, "MirrorSyncMode", name, errp);
2762}
2763
2764void visit_type_BlockJobTypeList(Visitor *m, BlockJobTypeList ** obj, const char *name, Error **errp)
2765{
2766 GenericList *i, **prev = (GenericList **)obj;
2767 Error *err = NULL((void*)0);
2768
2769 if (!error_is_set(errp)) {
2770 visit_start_list(m, name, &err);
2771 if (!err) {
2772 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2773 BlockJobTypeList *native_i = (BlockJobTypeList *)i;
2774 visit_type_BlockJobType(m, &native_i->value, NULL((void*)0), &err);
2775 }
2776 error_propagate(errp, err);
2777 err = NULL((void*)0);
2778
2779 /* Always call end_list if start_list succeeded. */
2780 visit_end_list(m, &err);
2781 }
2782 error_propagate(errp, err);
2783 }
2784}
2785
2786void visit_type_BlockJobType(Visitor *m, BlockJobType * obj, const char *name, Error **errp)
2787{
2788 visit_type_enum(m, (int *)obj, BlockJobType_lookup, "BlockJobType", name, errp);
2789}
2790
2791static void visit_type_BlockJobInfo_fields(Visitor *m, BlockJobInfo ** obj, Error **errp)
2792{
2793 Error *err = NULL((void*)0);
2794 visit_type_str(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
2795 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
2796 visit_type_int(m, obj ? &(*obj)->len : NULL((void*)0), "len", &err);
2797 visit_type_int(m, obj ? &(*obj)->offset : NULL((void*)0), "offset", &err);
2798 visit_type_bool(m, obj ? &(*obj)->busy : NULL((void*)0), "busy", &err);
2799 visit_type_bool(m, obj ? &(*obj)->paused : NULL((void*)0), "paused", &err);
2800 visit_type_int(m, obj ? &(*obj)->speed : NULL((void*)0), "speed", &err);
2801 visit_type_BlockDeviceIoStatus(m, obj ? &(*obj)->io_status : NULL((void*)0), "io-status", &err);
2802
2803 error_propagate(errp, err);
2804}
2805
2806void visit_type_BlockJobInfo(Visitor *m, BlockJobInfo ** obj, const char *name, Error **errp)
2807{
2808 if (!error_is_set(errp)) {
2809 Error *err = NULL((void*)0);
2810 visit_start_struct(m, (void **)obj, "BlockJobInfo", name, sizeof(BlockJobInfo), &err);
2811 if (!err) {
2812 if (!obj || *obj) {
2813 visit_type_BlockJobInfo_fields(m, obj, &err);
2814 error_propagate(errp, err);
2815 err = NULL((void*)0);
2816 }
2817 /* Always call end_struct if start_struct succeeded. */
2818 visit_end_struct(m, &err);
2819 }
2820 error_propagate(errp, err);
2821 }
2822}
2823
2824void visit_type_BlockJobInfoList(Visitor *m, BlockJobInfoList ** obj, const char *name, Error **errp)
2825{
2826 GenericList *i, **prev = (GenericList **)obj;
2827 Error *err = NULL((void*)0);
2828
2829 if (!error_is_set(errp)) {
2830 visit_start_list(m, name, &err);
2831 if (!err) {
2832 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2833 BlockJobInfoList *native_i = (BlockJobInfoList *)i;
2834 visit_type_BlockJobInfo(m, &native_i->value, NULL((void*)0), &err);
2835 }
2836 error_propagate(errp, err);
2837 err = NULL((void*)0);
2838
2839 /* Always call end_list if start_list succeeded. */
2840 visit_end_list(m, &err);
2841 }
2842 error_propagate(errp, err);
2843 }
2844}
2845
2846void visit_type_NewImageModeList(Visitor *m, NewImageModeList ** obj, const char *name, Error **errp)
2847{
2848 GenericList *i, **prev = (GenericList **)obj;
2849 Error *err = NULL((void*)0);
2850
2851 if (!error_is_set(errp)) {
2852 visit_start_list(m, name, &err);
2853 if (!err) {
2854 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2855 NewImageModeList *native_i = (NewImageModeList *)i;
2856 visit_type_NewImageMode(m, &native_i->value, NULL((void*)0), &err);
2857 }
2858 error_propagate(errp, err);
2859 err = NULL((void*)0);
2860
2861 /* Always call end_list if start_list succeeded. */
2862 visit_end_list(m, &err);
2863 }
2864 error_propagate(errp, err);
2865 }
2866}
2867
2868void visit_type_NewImageMode(Visitor *m, NewImageMode * obj, const char *name, Error **errp)
2869{
2870 visit_type_enum(m, (int *)obj, NewImageMode_lookup, "NewImageMode", name, errp);
2871}
2872
2873static void visit_type_BlockdevSnapshot_fields(Visitor *m, BlockdevSnapshot ** obj, Error **errp)
2874{
2875 Error *err = NULL((void*)0);
2876 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
2877 visit_type_str(m, obj ? &(*obj)->snapshot_file : NULL((void*)0), "snapshot-file", &err);
2878 visit_start_optional(m, obj ? &(*obj)->has_format : NULL((void*)0), "format", &err);
2879 if (obj && (*obj)->has_format) {
2880 visit_type_str(m, obj ? &(*obj)->format : NULL((void*)0), "format", &err);
2881 }
2882 visit_end_optional(m, &err);
2883 visit_start_optional(m, obj ? &(*obj)->has_mode : NULL((void*)0), "mode", &err);
2884 if (obj && (*obj)->has_mode) {
2885 visit_type_NewImageMode(m, obj ? &(*obj)->mode : NULL((void*)0), "mode", &err);
2886 }
2887 visit_end_optional(m, &err);
2888
2889 error_propagate(errp, err);
2890}
2891
2892void visit_type_BlockdevSnapshot(Visitor *m, BlockdevSnapshot ** obj, const char *name, Error **errp)
2893{
2894 if (!error_is_set(errp)) {
2895 Error *err = NULL((void*)0);
2896 visit_start_struct(m, (void **)obj, "BlockdevSnapshot", name, sizeof(BlockdevSnapshot), &err);
2897 if (!err) {
2898 if (!obj || *obj) {
2899 visit_type_BlockdevSnapshot_fields(m, obj, &err);
2900 error_propagate(errp, err);
2901 err = NULL((void*)0);
2902 }
2903 /* Always call end_struct if start_struct succeeded. */
2904 visit_end_struct(m, &err);
2905 }
2906 error_propagate(errp, err);
2907 }
2908}
2909
2910void visit_type_BlockdevSnapshotList(Visitor *m, BlockdevSnapshotList ** obj, const char *name, Error **errp)
2911{
2912 GenericList *i, **prev = (GenericList **)obj;
2913 Error *err = NULL((void*)0);
2914
2915 if (!error_is_set(errp)) {
2916 visit_start_list(m, name, &err);
2917 if (!err) {
2918 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2919 BlockdevSnapshotList *native_i = (BlockdevSnapshotList *)i;
2920 visit_type_BlockdevSnapshot(m, &native_i->value, NULL((void*)0), &err);
2921 }
2922 error_propagate(errp, err);
2923 err = NULL((void*)0);
2924
2925 /* Always call end_list if start_list succeeded. */
2926 visit_end_list(m, &err);
2927 }
2928 error_propagate(errp, err);
2929 }
2930}
2931
2932static void visit_type_BlockdevSnapshotInternal_fields(Visitor *m, BlockdevSnapshotInternal ** obj, Error **errp)
2933{
2934 Error *err = NULL((void*)0);
2935 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
2936 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
2937
2938 error_propagate(errp, err);
2939}
2940
2941void visit_type_BlockdevSnapshotInternal(Visitor *m, BlockdevSnapshotInternal ** obj, const char *name, Error **errp)
2942{
2943 if (!error_is_set(errp)) {
2944 Error *err = NULL((void*)0);
2945 visit_start_struct(m, (void **)obj, "BlockdevSnapshotInternal", name, sizeof(BlockdevSnapshotInternal), &err);
2946 if (!err) {
2947 if (!obj || *obj) {
2948 visit_type_BlockdevSnapshotInternal_fields(m, obj, &err);
2949 error_propagate(errp, err);
2950 err = NULL((void*)0);
2951 }
2952 /* Always call end_struct if start_struct succeeded. */
2953 visit_end_struct(m, &err);
2954 }
2955 error_propagate(errp, err);
2956 }
2957}
2958
2959void visit_type_BlockdevSnapshotInternalList(Visitor *m, BlockdevSnapshotInternalList ** obj, const char *name, Error **errp)
2960{
2961 GenericList *i, **prev = (GenericList **)obj;
2962 Error *err = NULL((void*)0);
2963
2964 if (!error_is_set(errp)) {
2965 visit_start_list(m, name, &err);
2966 if (!err) {
2967 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
2968 BlockdevSnapshotInternalList *native_i = (BlockdevSnapshotInternalList *)i;
2969 visit_type_BlockdevSnapshotInternal(m, &native_i->value, NULL((void*)0), &err);
2970 }
2971 error_propagate(errp, err);
2972 err = NULL((void*)0);
2973
2974 /* Always call end_list if start_list succeeded. */
2975 visit_end_list(m, &err);
2976 }
2977 error_propagate(errp, err);
2978 }
2979}
2980
2981static void visit_type_DriveBackup_fields(Visitor *m, DriveBackup ** obj, Error **errp)
2982{
2983 Error *err = NULL((void*)0);
2984 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
2985 visit_type_str(m, obj ? &(*obj)->target : NULL((void*)0), "target", &err);
2986 visit_start_optional(m, obj ? &(*obj)->has_format : NULL((void*)0), "format", &err);
2987 if (obj && (*obj)->has_format) {
2988 visit_type_str(m, obj ? &(*obj)->format : NULL((void*)0), "format", &err);
2989 }
2990 visit_end_optional(m, &err);
2991 visit_type_MirrorSyncMode(m, obj ? &(*obj)->sync : NULL((void*)0), "sync", &err);
2992 visit_start_optional(m, obj ? &(*obj)->has_mode : NULL((void*)0), "mode", &err);
2993 if (obj && (*obj)->has_mode) {
2994 visit_type_NewImageMode(m, obj ? &(*obj)->mode : NULL((void*)0), "mode", &err);
2995 }
2996 visit_end_optional(m, &err);
2997 visit_start_optional(m, obj ? &(*obj)->has_speed : NULL((void*)0), "speed", &err);
2998 if (obj && (*obj)->has_speed) {
2999 visit_type_int(m, obj ? &(*obj)->speed : NULL((void*)0), "speed", &err);
3000 }
3001 visit_end_optional(m, &err);
3002 visit_start_optional(m, obj ? &(*obj)->has_on_source_error : NULL((void*)0), "on-source-error", &err);
3003 if (obj && (*obj)->has_on_source_error) {
3004 visit_type_BlockdevOnError(m, obj ? &(*obj)->on_source_error : NULL((void*)0), "on-source-error", &err);
3005 }
3006 visit_end_optional(m, &err);
3007 visit_start_optional(m, obj ? &(*obj)->has_on_target_error : NULL((void*)0), "on-target-error", &err);
3008 if (obj && (*obj)->has_on_target_error) {
3009 visit_type_BlockdevOnError(m, obj ? &(*obj)->on_target_error : NULL((void*)0), "on-target-error", &err);
3010 }
3011 visit_end_optional(m, &err);
3012
3013 error_propagate(errp, err);
3014}
3015
3016void visit_type_DriveBackup(Visitor *m, DriveBackup ** obj, const char *name, Error **errp)
3017{
3018 if (!error_is_set(errp)) {
3019 Error *err = NULL((void*)0);
3020 visit_start_struct(m, (void **)obj, "DriveBackup", name, sizeof(DriveBackup), &err);
3021 if (!err) {
3022 if (!obj || *obj) {
3023 visit_type_DriveBackup_fields(m, obj, &err);
3024 error_propagate(errp, err);
3025 err = NULL((void*)0);
3026 }
3027 /* Always call end_struct if start_struct succeeded. */
3028 visit_end_struct(m, &err);
3029 }
3030 error_propagate(errp, err);
3031 }
3032}
3033
3034void visit_type_DriveBackupList(Visitor *m, DriveBackupList ** obj, const char *name, Error **errp)
3035{
3036 GenericList *i, **prev = (GenericList **)obj;
3037 Error *err = NULL((void*)0);
3038
3039 if (!error_is_set(errp)) {
3040 visit_start_list(m, name, &err);
3041 if (!err) {
3042 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3043 DriveBackupList *native_i = (DriveBackupList *)i;
3044 visit_type_DriveBackup(m, &native_i->value, NULL((void*)0), &err);
3045 }
3046 error_propagate(errp, err);
3047 err = NULL((void*)0);
3048
3049 /* Always call end_list if start_list succeeded. */
3050 visit_end_list(m, &err);
3051 }
3052 error_propagate(errp, err);
3053 }
3054}
3055
3056static void visit_type_Abort_fields(Visitor *m, Abort ** obj, Error **errp)
3057{
3058 Error *err = NULL((void*)0);
3059
3060 error_propagate(errp, err);
3061}
3062
3063void visit_type_Abort(Visitor *m, Abort ** obj, const char *name, Error **errp)
3064{
3065 if (!error_is_set(errp)) {
3066 Error *err = NULL((void*)0);
3067 visit_start_struct(m, (void **)obj, "Abort", name, sizeof(Abort), &err);
3068 if (!err) {
3069 if (!obj || *obj) {
3070 visit_type_Abort_fields(m, obj, &err);
3071 error_propagate(errp, err);
3072 err = NULL((void*)0);
3073 }
3074 /* Always call end_struct if start_struct succeeded. */
3075 visit_end_struct(m, &err);
3076 }
3077 error_propagate(errp, err);
3078 }
3079}
3080
3081void visit_type_AbortList(Visitor *m, AbortList ** obj, const char *name, Error **errp)
3082{
3083 GenericList *i, **prev = (GenericList **)obj;
3084 Error *err = NULL((void*)0);
3085
3086 if (!error_is_set(errp)) {
3087 visit_start_list(m, name, &err);
3088 if (!err) {
3089 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3090 AbortList *native_i = (AbortList *)i;
3091 visit_type_Abort(m, &native_i->value, NULL((void*)0), &err);
3092 }
3093 error_propagate(errp, err);
3094 err = NULL((void*)0);
3095
3096 /* Always call end_list if start_list succeeded. */
3097 visit_end_list(m, &err);
3098 }
3099 error_propagate(errp, err);
3100 }
3101}
3102
3103void visit_type_TransactionActionKind(Visitor *m, TransactionActionKind * obj, const char *name, Error **errp)
3104{
3105 visit_type_enum(m, (int *)obj, TransactionActionKind_lookup, "TransactionActionKind", name, errp);
3106}
3107
3108void visit_type_TransactionAction(Visitor *m, TransactionAction ** obj, const char *name, Error **errp)
3109{
3110 Error *err = NULL((void*)0);
3111
3112 if (!error_is_set(errp)) {
3113 visit_start_struct(m, (void **)obj, "TransactionAction", name, sizeof(TransactionAction), &err);
3114 if (!err) {
3115 if (obj && *obj) {
3116 visit_type_TransactionActionKind(m, &(*obj)->kind, "type", &err);
3117 if (!err) {
3118 switch ((*obj)->kind) {
3119 case TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT_SYNC:
3120 visit_type_BlockdevSnapshot(m, &(*obj)->blockdev_snapshot_sync, "data", &err);
3121 break;
3122 case TRANSACTION_ACTION_KIND_DRIVE_BACKUP:
3123 visit_type_DriveBackup(m, &(*obj)->drive_backup, "data", &err);
3124 break;
3125 case TRANSACTION_ACTION_KIND_ABORT:
3126 visit_type_Abort(m, &(*obj)->abort, "data", &err);
3127 break;
3128 case TRANSACTION_ACTION_KIND_BLOCKDEV_SNAPSHOT_INTERNAL_SYNC:
3129 visit_type_BlockdevSnapshotInternal(m, &(*obj)->blockdev_snapshot_internal_sync, "data", &err);
3130 break;
3131 default:
3132 abort();
3133 }
3134 }
3135 error_propagate(errp, err);
3136 err = NULL((void*)0);
3137 }
3138 /* Always call end_struct if start_struct succeeded. */
3139 visit_end_struct(m, &err);
3140 }
3141 error_propagate(errp, err);
3142 }
3143}
3144
3145void visit_type_TransactionActionList(Visitor *m, TransactionActionList ** obj, const char *name, Error **errp)
3146{
3147 GenericList *i, **prev = (GenericList **)obj;
3148 Error *err = NULL((void*)0);
3149
3150 if (!error_is_set(errp)) {
3151 visit_start_list(m, name, &err);
3152 if (!err) {
3153 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3154 TransactionActionList *native_i = (TransactionActionList *)i;
3155 visit_type_TransactionAction(m, &native_i->value, NULL((void*)0), &err);
3156 }
3157 error_propagate(errp, err);
3158 err = NULL((void*)0);
3159
3160 /* Always call end_list if start_list succeeded. */
3161 visit_end_list(m, &err);
3162 }
3163 error_propagate(errp, err);
3164 }
3165}
3166
3167static void visit_type_ObjectPropertyInfo_fields(Visitor *m, ObjectPropertyInfo ** obj, Error **errp)
3168{
3169 Error *err = NULL((void*)0);
3170 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
3171 visit_type_str(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
3172
3173 error_propagate(errp, err);
3174}
3175
3176void visit_type_ObjectPropertyInfo(Visitor *m, ObjectPropertyInfo ** obj, const char *name, Error **errp)
3177{
3178 if (!error_is_set(errp)) {
3179 Error *err = NULL((void*)0);
3180 visit_start_struct(m, (void **)obj, "ObjectPropertyInfo", name, sizeof(ObjectPropertyInfo), &err);
3181 if (!err) {
3182 if (!obj || *obj) {
3183 visit_type_ObjectPropertyInfo_fields(m, obj, &err);
3184 error_propagate(errp, err);
3185 err = NULL((void*)0);
3186 }
3187 /* Always call end_struct if start_struct succeeded. */
3188 visit_end_struct(m, &err);
3189 }
3190 error_propagate(errp, err);
3191 }
3192}
3193
3194void visit_type_ObjectPropertyInfoList(Visitor *m, ObjectPropertyInfoList ** obj, const char *name, Error **errp)
3195{
3196 GenericList *i, **prev = (GenericList **)obj;
3197 Error *err = NULL((void*)0);
3198
3199 if (!error_is_set(errp)) {
3200 visit_start_list(m, name, &err);
3201 if (!err) {
3202 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3203 ObjectPropertyInfoList *native_i = (ObjectPropertyInfoList *)i;
3204 visit_type_ObjectPropertyInfo(m, &native_i->value, NULL((void*)0), &err);
3205 }
3206 error_propagate(errp, err);
3207 err = NULL((void*)0);
3208
3209 /* Always call end_list if start_list succeeded. */
3210 visit_end_list(m, &err);
3211 }
3212 error_propagate(errp, err);
3213 }
3214}
3215
3216static void visit_type_ObjectTypeInfo_fields(Visitor *m, ObjectTypeInfo ** obj, Error **errp)
3217{
3218 Error *err = NULL((void*)0);
3219 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
3220
3221 error_propagate(errp, err);
3222}
3223
3224void visit_type_ObjectTypeInfo(Visitor *m, ObjectTypeInfo ** obj, const char *name, Error **errp)
3225{
3226 if (!error_is_set(errp)) {
3227 Error *err = NULL((void*)0);
3228 visit_start_struct(m, (void **)obj, "ObjectTypeInfo", name, sizeof(ObjectTypeInfo), &err);
3229 if (!err) {
3230 if (!obj || *obj) {
3231 visit_type_ObjectTypeInfo_fields(m, obj, &err);
3232 error_propagate(errp, err);
3233 err = NULL((void*)0);
3234 }
3235 /* Always call end_struct if start_struct succeeded. */
3236 visit_end_struct(m, &err);
3237 }
3238 error_propagate(errp, err);
3239 }
3240}
3241
3242void visit_type_ObjectTypeInfoList(Visitor *m, ObjectTypeInfoList ** obj, const char *name, Error **errp)
3243{
3244 GenericList *i, **prev = (GenericList **)obj;
3245 Error *err = NULL((void*)0);
3246
3247 if (!error_is_set(errp)) {
3248 visit_start_list(m, name, &err);
3249 if (!err) {
3250 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3251 ObjectTypeInfoList *native_i = (ObjectTypeInfoList *)i;
3252 visit_type_ObjectTypeInfo(m, &native_i->value, NULL((void*)0), &err);
3253 }
3254 error_propagate(errp, err);
3255 err = NULL((void*)0);
3256
3257 /* Always call end_list if start_list succeeded. */
3258 visit_end_list(m, &err);
3259 }
3260 error_propagate(errp, err);
3261 }
3262}
3263
3264static void visit_type_DevicePropertyInfo_fields(Visitor *m, DevicePropertyInfo ** obj, Error **errp)
3265{
3266 Error *err = NULL((void*)0);
3267 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
3268 visit_type_str(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
3269
3270 error_propagate(errp, err);
3271}
3272
3273void visit_type_DevicePropertyInfo(Visitor *m, DevicePropertyInfo ** obj, const char *name, Error **errp)
3274{
3275 if (!error_is_set(errp)) {
3276 Error *err = NULL((void*)0);
3277 visit_start_struct(m, (void **)obj, "DevicePropertyInfo", name, sizeof(DevicePropertyInfo), &err);
3278 if (!err) {
3279 if (!obj || *obj) {
3280 visit_type_DevicePropertyInfo_fields(m, obj, &err);
3281 error_propagate(errp, err);
3282 err = NULL((void*)0);
3283 }
3284 /* Always call end_struct if start_struct succeeded. */
3285 visit_end_struct(m, &err);
3286 }
3287 error_propagate(errp, err);
3288 }
3289}
3290
3291void visit_type_DevicePropertyInfoList(Visitor *m, DevicePropertyInfoList ** obj, const char *name, Error **errp)
3292{
3293 GenericList *i, **prev = (GenericList **)obj;
3294 Error *err = NULL((void*)0);
3295
3296 if (!error_is_set(errp)) {
3297 visit_start_list(m, name, &err);
3298 if (!err) {
3299 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3300 DevicePropertyInfoList *native_i = (DevicePropertyInfoList *)i;
3301 visit_type_DevicePropertyInfo(m, &native_i->value, NULL((void*)0), &err);
3302 }
3303 error_propagate(errp, err);
3304 err = NULL((void*)0);
3305
3306 /* Always call end_list if start_list succeeded. */
3307 visit_end_list(m, &err);
3308 }
3309 error_propagate(errp, err);
3310 }
3311}
3312
3313static void visit_type_NetdevNoneOptions_fields(Visitor *m, NetdevNoneOptions ** obj, Error **errp)
3314{
3315 Error *err = NULL((void*)0);
3316
3317 error_propagate(errp, err);
3318}
3319
3320void visit_type_NetdevNoneOptions(Visitor *m, NetdevNoneOptions ** obj, const char *name, Error **errp)
3321{
3322 if (!error_is_set(errp)) {
3323 Error *err = NULL((void*)0);
3324 visit_start_struct(m, (void **)obj, "NetdevNoneOptions", name, sizeof(NetdevNoneOptions), &err);
3325 if (!err) {
3326 if (!obj || *obj) {
3327 visit_type_NetdevNoneOptions_fields(m, obj, &err);
3328 error_propagate(errp, err);
3329 err = NULL((void*)0);
3330 }
3331 /* Always call end_struct if start_struct succeeded. */
3332 visit_end_struct(m, &err);
3333 }
3334 error_propagate(errp, err);
3335 }
3336}
3337
3338void visit_type_NetdevNoneOptionsList(Visitor *m, NetdevNoneOptionsList ** obj, const char *name, Error **errp)
3339{
3340 GenericList *i, **prev = (GenericList **)obj;
3341 Error *err = NULL((void*)0);
3342
3343 if (!error_is_set(errp)) {
3344 visit_start_list(m, name, &err);
3345 if (!err) {
3346 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3347 NetdevNoneOptionsList *native_i = (NetdevNoneOptionsList *)i;
3348 visit_type_NetdevNoneOptions(m, &native_i->value, NULL((void*)0), &err);
3349 }
3350 error_propagate(errp, err);
3351 err = NULL((void*)0);
3352
3353 /* Always call end_list if start_list succeeded. */
3354 visit_end_list(m, &err);
3355 }
3356 error_propagate(errp, err);
3357 }
3358}
3359
3360static void visit_type_NetLegacyNicOptions_fields(Visitor *m, NetLegacyNicOptions ** obj, Error **errp)
3361{
3362 Error *err = NULL((void*)0);
3363 visit_start_optional(m, obj ? &(*obj)->has_netdev : NULL((void*)0), "netdev", &err);
3364 if (obj && (*obj)->has_netdev) {
3365 visit_type_str(m, obj ? &(*obj)->netdev : NULL((void*)0), "netdev", &err);
3366 }
3367 visit_end_optional(m, &err);
3368 visit_start_optional(m, obj ? &(*obj)->has_macaddr : NULL((void*)0), "macaddr", &err);
3369 if (obj && (*obj)->has_macaddr) {
3370 visit_type_str(m, obj ? &(*obj)->macaddr : NULL((void*)0), "macaddr", &err);
3371 }
3372 visit_end_optional(m, &err);
3373 visit_start_optional(m, obj ? &(*obj)->has_model : NULL((void*)0), "model", &err);
3374 if (obj && (*obj)->has_model) {
3375 visit_type_str(m, obj ? &(*obj)->model : NULL((void*)0), "model", &err);
3376 }
3377 visit_end_optional(m, &err);
3378 visit_start_optional(m, obj ? &(*obj)->has_addr : NULL((void*)0), "addr", &err);
3379 if (obj && (*obj)->has_addr) {
3380 visit_type_str(m, obj ? &(*obj)->addr : NULL((void*)0), "addr", &err);
3381 }
3382 visit_end_optional(m, &err);
3383 visit_start_optional(m, obj ? &(*obj)->has_vectors : NULL((void*)0), "vectors", &err);
3384 if (obj && (*obj)->has_vectors) {
3385 visit_type_uint32(m, obj ? &(*obj)->vectors : NULL((void*)0), "vectors", &err);
3386 }
3387 visit_end_optional(m, &err);
3388
3389 error_propagate(errp, err);
3390}
3391
3392void visit_type_NetLegacyNicOptions(Visitor *m, NetLegacyNicOptions ** obj, const char *name, Error **errp)
3393{
3394 if (!error_is_set(errp)) {
3395 Error *err = NULL((void*)0);
3396 visit_start_struct(m, (void **)obj, "NetLegacyNicOptions", name, sizeof(NetLegacyNicOptions), &err);
3397 if (!err) {
3398 if (!obj || *obj) {
3399 visit_type_NetLegacyNicOptions_fields(m, obj, &err);
3400 error_propagate(errp, err);
3401 err = NULL((void*)0);
3402 }
3403 /* Always call end_struct if start_struct succeeded. */
3404 visit_end_struct(m, &err);
3405 }
3406 error_propagate(errp, err);
3407 }
3408}
3409
3410void visit_type_NetLegacyNicOptionsList(Visitor *m, NetLegacyNicOptionsList ** obj, const char *name, Error **errp)
3411{
3412 GenericList *i, **prev = (GenericList **)obj;
3413 Error *err = NULL((void*)0);
3414
3415 if (!error_is_set(errp)) {
3416 visit_start_list(m, name, &err);
3417 if (!err) {
3418 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3419 NetLegacyNicOptionsList *native_i = (NetLegacyNicOptionsList *)i;
3420 visit_type_NetLegacyNicOptions(m, &native_i->value, NULL((void*)0), &err);
3421 }
3422 error_propagate(errp, err);
3423 err = NULL((void*)0);
3424
3425 /* Always call end_list if start_list succeeded. */
3426 visit_end_list(m, &err);
3427 }
3428 error_propagate(errp, err);
3429 }
3430}
3431
3432static void visit_type_String_fields(Visitor *m, String ** obj, Error **errp)
3433{
3434 Error *err = NULL((void*)0);
3435 visit_type_str(m, obj ? &(*obj)->str : NULL((void*)0), "str", &err);
3436
3437 error_propagate(errp, err);
3438}
3439
3440void visit_type_String(Visitor *m, String ** obj, const char *name, Error **errp)
3441{
3442 if (!error_is_set(errp)) {
3443 Error *err = NULL((void*)0);
3444 visit_start_struct(m, (void **)obj, "String", name, sizeof(String), &err);
3445 if (!err) {
3446 if (!obj || *obj) {
3447 visit_type_String_fields(m, obj, &err);
3448 error_propagate(errp, err);
3449 err = NULL((void*)0);
3450 }
3451 /* Always call end_struct if start_struct succeeded. */
3452 visit_end_struct(m, &err);
3453 }
3454 error_propagate(errp, err);
3455 }
3456}
3457
3458void visit_type_StringList(Visitor *m, StringList ** obj, const char *name, Error **errp)
3459{
3460 GenericList *i, **prev = (GenericList **)obj;
3461 Error *err = NULL((void*)0);
3462
3463 if (!error_is_set(errp)) {
3464 visit_start_list(m, name, &err);
3465 if (!err) {
3466 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3467 StringList *native_i = (StringList *)i;
3468 visit_type_String(m, &native_i->value, NULL((void*)0), &err);
3469 }
3470 error_propagate(errp, err);
3471 err = NULL((void*)0);
3472
3473 /* Always call end_list if start_list succeeded. */
3474 visit_end_list(m, &err);
3475 }
3476 error_propagate(errp, err);
3477 }
3478}
3479
3480static void visit_type_NetdevUserOptions_fields(Visitor *m, NetdevUserOptions ** obj, Error **errp)
3481{
3482 Error *err = NULL((void*)0);
3483 visit_start_optional(m, obj ? &(*obj)->has_hostname : NULL((void*)0), "hostname", &err);
3484 if (obj && (*obj)->has_hostname) {
3485 visit_type_str(m, obj ? &(*obj)->hostname : NULL((void*)0), "hostname", &err);
3486 }
3487 visit_end_optional(m, &err);
3488 visit_start_optional(m, obj ? &(*obj)->has_q_restrict : NULL((void*)0), "restrict", &err);
3489 if (obj && (*obj)->has_q_restrict) {
3490 visit_type_bool(m, obj ? &(*obj)->q_restrict : NULL((void*)0), "restrict", &err);
3491 }
3492 visit_end_optional(m, &err);
3493 visit_start_optional(m, obj ? &(*obj)->has_ip : NULL((void*)0), "ip", &err);
3494 if (obj && (*obj)->has_ip) {
3495 visit_type_str(m, obj ? &(*obj)->ip : NULL((void*)0), "ip", &err);
3496 }
3497 visit_end_optional(m, &err);
3498 visit_start_optional(m, obj ? &(*obj)->has_net : NULL((void*)0), "net", &err);
3499 if (obj && (*obj)->has_net) {
3500 visit_type_str(m, obj ? &(*obj)->net : NULL((void*)0), "net", &err);
3501 }
3502 visit_end_optional(m, &err);
3503 visit_start_optional(m, obj ? &(*obj)->has_host : NULL((void*)0), "host", &err);
3504 if (obj && (*obj)->has_host) {
3505 visit_type_str(m, obj ? &(*obj)->host : NULL((void*)0), "host", &err);
3506 }
3507 visit_end_optional(m, &err);
3508 visit_start_optional(m, obj ? &(*obj)->has_tftp : NULL((void*)0), "tftp", &err);
3509 if (obj && (*obj)->has_tftp) {
3510 visit_type_str(m, obj ? &(*obj)->tftp : NULL((void*)0), "tftp", &err);
3511 }
3512 visit_end_optional(m, &err);
3513 visit_start_optional(m, obj ? &(*obj)->has_bootfile : NULL((void*)0), "bootfile", &err);
3514 if (obj && (*obj)->has_bootfile) {
3515 visit_type_str(m, obj ? &(*obj)->bootfile : NULL((void*)0), "bootfile", &err);
3516 }
3517 visit_end_optional(m, &err);
3518 visit_start_optional(m, obj ? &(*obj)->has_dhcpstart : NULL((void*)0), "dhcpstart", &err);
3519 if (obj && (*obj)->has_dhcpstart) {
3520 visit_type_str(m, obj ? &(*obj)->dhcpstart : NULL((void*)0), "dhcpstart", &err);
3521 }
3522 visit_end_optional(m, &err);
3523 visit_start_optional(m, obj ? &(*obj)->has_dns : NULL((void*)0), "dns", &err);
3524 if (obj && (*obj)->has_dns) {
3525 visit_type_str(m, obj ? &(*obj)->dns : NULL((void*)0), "dns", &err);
3526 }
3527 visit_end_optional(m, &err);
3528 visit_start_optional(m, obj ? &(*obj)->has_dnssearch : NULL((void*)0), "dnssearch", &err);
3529 if (obj && (*obj)->has_dnssearch) {
3530 visit_type_StringList(m, obj ? &(*obj)->dnssearch : NULL((void*)0), "dnssearch", &err);
3531 }
3532 visit_end_optional(m, &err);
3533 visit_start_optional(m, obj ? &(*obj)->has_smb : NULL((void*)0), "smb", &err);
3534 if (obj && (*obj)->has_smb) {
3535 visit_type_str(m, obj ? &(*obj)->smb : NULL((void*)0), "smb", &err);
3536 }
3537 visit_end_optional(m, &err);
3538 visit_start_optional(m, obj ? &(*obj)->has_smbserver : NULL((void*)0), "smbserver", &err);
3539 if (obj && (*obj)->has_smbserver) {
3540 visit_type_str(m, obj ? &(*obj)->smbserver : NULL((void*)0), "smbserver", &err);
3541 }
3542 visit_end_optional(m, &err);
3543 visit_start_optional(m, obj ? &(*obj)->has_hostfwd : NULL((void*)0), "hostfwd", &err);
3544 if (obj && (*obj)->has_hostfwd) {
3545 visit_type_StringList(m, obj ? &(*obj)->hostfwd : NULL((void*)0), "hostfwd", &err);
3546 }
3547 visit_end_optional(m, &err);
3548 visit_start_optional(m, obj ? &(*obj)->has_guestfwd : NULL((void*)0), "guestfwd", &err);
3549 if (obj && (*obj)->has_guestfwd) {
3550 visit_type_StringList(m, obj ? &(*obj)->guestfwd : NULL((void*)0), "guestfwd", &err);
3551 }
3552 visit_end_optional(m, &err);
3553
3554 error_propagate(errp, err);
3555}
3556
3557void visit_type_NetdevUserOptions(Visitor *m, NetdevUserOptions ** obj, const char *name, Error **errp)
3558{
3559 if (!error_is_set(errp)) {
3560 Error *err = NULL((void*)0);
3561 visit_start_struct(m, (void **)obj, "NetdevUserOptions", name, sizeof(NetdevUserOptions), &err);
3562 if (!err) {
3563 if (!obj || *obj) {
3564 visit_type_NetdevUserOptions_fields(m, obj, &err);
3565 error_propagate(errp, err);
3566 err = NULL((void*)0);
3567 }
3568 /* Always call end_struct if start_struct succeeded. */
3569 visit_end_struct(m, &err);
3570 }
3571 error_propagate(errp, err);
3572 }
3573}
3574
3575void visit_type_NetdevUserOptionsList(Visitor *m, NetdevUserOptionsList ** obj, const char *name, Error **errp)
3576{
3577 GenericList *i, **prev = (GenericList **)obj;
3578 Error *err = NULL((void*)0);
3579
3580 if (!error_is_set(errp)) {
3581 visit_start_list(m, name, &err);
3582 if (!err) {
3583 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3584 NetdevUserOptionsList *native_i = (NetdevUserOptionsList *)i;
3585 visit_type_NetdevUserOptions(m, &native_i->value, NULL((void*)0), &err);
3586 }
3587 error_propagate(errp, err);
3588 err = NULL((void*)0);
3589
3590 /* Always call end_list if start_list succeeded. */
3591 visit_end_list(m, &err);
3592 }
3593 error_propagate(errp, err);
3594 }
3595}
3596
3597static void visit_type_NetdevTapOptions_fields(Visitor *m, NetdevTapOptions ** obj, Error **errp)
3598{
3599 Error *err = NULL((void*)0);
3600 visit_start_optional(m, obj ? &(*obj)->has_ifname : NULL((void*)0), "ifname", &err);
3601 if (obj && (*obj)->has_ifname) {
3602 visit_type_str(m, obj ? &(*obj)->ifname : NULL((void*)0), "ifname", &err);
3603 }
3604 visit_end_optional(m, &err);
3605 visit_start_optional(m, obj ? &(*obj)->has_fd : NULL((void*)0), "fd", &err);
3606 if (obj && (*obj)->has_fd) {
3607 visit_type_str(m, obj ? &(*obj)->fd : NULL((void*)0), "fd", &err);
3608 }
3609 visit_end_optional(m, &err);
3610 visit_start_optional(m, obj ? &(*obj)->has_fds : NULL((void*)0), "fds", &err);
3611 if (obj && (*obj)->has_fds) {
3612 visit_type_str(m, obj ? &(*obj)->fds : NULL((void*)0), "fds", &err);
3613 }
3614 visit_end_optional(m, &err);
3615 visit_start_optional(m, obj ? &(*obj)->has_script : NULL((void*)0), "script", &err);
3616 if (obj && (*obj)->has_script) {
3617 visit_type_str(m, obj ? &(*obj)->script : NULL((void*)0), "script", &err);
3618 }
3619 visit_end_optional(m, &err);
3620 visit_start_optional(m, obj ? &(*obj)->has_downscript : NULL((void*)0), "downscript", &err);
3621 if (obj && (*obj)->has_downscript) {
3622 visit_type_str(m, obj ? &(*obj)->downscript : NULL((void*)0), "downscript", &err);
3623 }
3624 visit_end_optional(m, &err);
3625 visit_start_optional(m, obj ? &(*obj)->has_helper : NULL((void*)0), "helper", &err);
3626 if (obj && (*obj)->has_helper) {
3627 visit_type_str(m, obj ? &(*obj)->helper : NULL((void*)0), "helper", &err);
3628 }
3629 visit_end_optional(m, &err);
3630 visit_start_optional(m, obj ? &(*obj)->has_sndbuf : NULL((void*)0), "sndbuf", &err);
3631 if (obj && (*obj)->has_sndbuf) {
3632 visit_type_size(m, obj ? &(*obj)->sndbuf : NULL((void*)0), "sndbuf", &err);
3633 }
3634 visit_end_optional(m, &err);
3635 visit_start_optional(m, obj ? &(*obj)->has_vnet_hdr : NULL((void*)0), "vnet_hdr", &err);
3636 if (obj && (*obj)->has_vnet_hdr) {
3637 visit_type_bool(m, obj ? &(*obj)->vnet_hdr : NULL((void*)0), "vnet_hdr", &err);
3638 }
3639 visit_end_optional(m, &err);
3640 visit_start_optional(m, obj ? &(*obj)->has_vhost : NULL((void*)0), "vhost", &err);
3641 if (obj && (*obj)->has_vhost) {
3642 visit_type_bool(m, obj ? &(*obj)->vhost : NULL((void*)0), "vhost", &err);
3643 }
3644 visit_end_optional(m, &err);
3645 visit_start_optional(m, obj ? &(*obj)->has_vhostfd : NULL((void*)0), "vhostfd", &err);
3646 if (obj && (*obj)->has_vhostfd) {
3647 visit_type_str(m, obj ? &(*obj)->vhostfd : NULL((void*)0), "vhostfd", &err);
3648 }
3649 visit_end_optional(m, &err);
3650 visit_start_optional(m, obj ? &(*obj)->has_vhostfds : NULL((void*)0), "vhostfds", &err);
3651 if (obj && (*obj)->has_vhostfds) {
3652 visit_type_str(m, obj ? &(*obj)->vhostfds : NULL((void*)0), "vhostfds", &err);
3653 }
3654 visit_end_optional(m, &err);
3655 visit_start_optional(m, obj ? &(*obj)->has_vhostforce : NULL((void*)0), "vhostforce", &err);
3656 if (obj && (*obj)->has_vhostforce) {
3657 visit_type_bool(m, obj ? &(*obj)->vhostforce : NULL((void*)0), "vhostforce", &err);
3658 }
3659 visit_end_optional(m, &err);
3660 visit_start_optional(m, obj ? &(*obj)->has_queues : NULL((void*)0), "queues", &err);
3661 if (obj && (*obj)->has_queues) {
3662 visit_type_uint32(m, obj ? &(*obj)->queues : NULL((void*)0), "queues", &err);
3663 }
3664 visit_end_optional(m, &err);
3665
3666 error_propagate(errp, err);
3667}
3668
3669void visit_type_NetdevTapOptions(Visitor *m, NetdevTapOptions ** obj, const char *name, Error **errp)
3670{
3671 if (!error_is_set(errp)) {
3672 Error *err = NULL((void*)0);
3673 visit_start_struct(m, (void **)obj, "NetdevTapOptions", name, sizeof(NetdevTapOptions), &err);
3674 if (!err) {
3675 if (!obj || *obj) {
3676 visit_type_NetdevTapOptions_fields(m, obj, &err);
3677 error_propagate(errp, err);
3678 err = NULL((void*)0);
3679 }
3680 /* Always call end_struct if start_struct succeeded. */
3681 visit_end_struct(m, &err);
3682 }
3683 error_propagate(errp, err);
3684 }
3685}
3686
3687void visit_type_NetdevTapOptionsList(Visitor *m, NetdevTapOptionsList ** obj, const char *name, Error **errp)
3688{
3689 GenericList *i, **prev = (GenericList **)obj;
3690 Error *err = NULL((void*)0);
3691
3692 if (!error_is_set(errp)) {
3693 visit_start_list(m, name, &err);
3694 if (!err) {
3695 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3696 NetdevTapOptionsList *native_i = (NetdevTapOptionsList *)i;
3697 visit_type_NetdevTapOptions(m, &native_i->value, NULL((void*)0), &err);
3698 }
3699 error_propagate(errp, err);
3700 err = NULL((void*)0);
3701
3702 /* Always call end_list if start_list succeeded. */
3703 visit_end_list(m, &err);
3704 }
3705 error_propagate(errp, err);
3706 }
3707}
3708
3709static void visit_type_NetdevSocketOptions_fields(Visitor *m, NetdevSocketOptions ** obj, Error **errp)
3710{
3711 Error *err = NULL((void*)0);
3712 visit_start_optional(m, obj ? &(*obj)->has_fd : NULL((void*)0), "fd", &err);
3713 if (obj && (*obj)->has_fd) {
3714 visit_type_str(m, obj ? &(*obj)->fd : NULL((void*)0), "fd", &err);
3715 }
3716 visit_end_optional(m, &err);
3717 visit_start_optional(m, obj ? &(*obj)->has_listen : NULL((void*)0), "listen", &err);
3718 if (obj && (*obj)->has_listen) {
3719 visit_type_str(m, obj ? &(*obj)->listen : NULL((void*)0), "listen", &err);
3720 }
3721 visit_end_optional(m, &err);
3722 visit_start_optional(m, obj ? &(*obj)->has_connect : NULL((void*)0), "connect", &err);
3723 if (obj && (*obj)->has_connect) {
3724 visit_type_str(m, obj ? &(*obj)->connect : NULL((void*)0), "connect", &err);
3725 }
3726 visit_end_optional(m, &err);
3727 visit_start_optional(m, obj ? &(*obj)->has_mcast : NULL((void*)0), "mcast", &err);
3728 if (obj && (*obj)->has_mcast) {
3729 visit_type_str(m, obj ? &(*obj)->mcast : NULL((void*)0), "mcast", &err);
3730 }
3731 visit_end_optional(m, &err);
3732 visit_start_optional(m, obj ? &(*obj)->has_localaddr : NULL((void*)0), "localaddr", &err);
3733 if (obj && (*obj)->has_localaddr) {
3734 visit_type_str(m, obj ? &(*obj)->localaddr : NULL((void*)0), "localaddr", &err);
3735 }
3736 visit_end_optional(m, &err);
3737 visit_start_optional(m, obj ? &(*obj)->has_udp : NULL((void*)0), "udp", &err);
3738 if (obj && (*obj)->has_udp) {
3739 visit_type_str(m, obj ? &(*obj)->udp : NULL((void*)0), "udp", &err);
3740 }
3741 visit_end_optional(m, &err);
3742
3743 error_propagate(errp, err);
3744}
3745
3746void visit_type_NetdevSocketOptions(Visitor *m, NetdevSocketOptions ** obj, const char *name, Error **errp)
3747{
3748 if (!error_is_set(errp)) {
3749 Error *err = NULL((void*)0);
3750 visit_start_struct(m, (void **)obj, "NetdevSocketOptions", name, sizeof(NetdevSocketOptions), &err);
3751 if (!err) {
3752 if (!obj || *obj) {
3753 visit_type_NetdevSocketOptions_fields(m, obj, &err);
3754 error_propagate(errp, err);
3755 err = NULL((void*)0);
3756 }
3757 /* Always call end_struct if start_struct succeeded. */
3758 visit_end_struct(m, &err);
3759 }
3760 error_propagate(errp, err);
3761 }
3762}
3763
3764void visit_type_NetdevSocketOptionsList(Visitor *m, NetdevSocketOptionsList ** obj, const char *name, Error **errp)
3765{
3766 GenericList *i, **prev = (GenericList **)obj;
3767 Error *err = NULL((void*)0);
3768
3769 if (!error_is_set(errp)) {
3770 visit_start_list(m, name, &err);
3771 if (!err) {
3772 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3773 NetdevSocketOptionsList *native_i = (NetdevSocketOptionsList *)i;
3774 visit_type_NetdevSocketOptions(m, &native_i->value, NULL((void*)0), &err);
3775 }
3776 error_propagate(errp, err);
3777 err = NULL((void*)0);
3778
3779 /* Always call end_list if start_list succeeded. */
3780 visit_end_list(m, &err);
3781 }
3782 error_propagate(errp, err);
3783 }
3784}
3785
3786static void visit_type_NetdevVdeOptions_fields(Visitor *m, NetdevVdeOptions ** obj, Error **errp)
3787{
3788 Error *err = NULL((void*)0);
3789 visit_start_optional(m, obj ? &(*obj)->has_sock : NULL((void*)0), "sock", &err);
3790 if (obj && (*obj)->has_sock) {
3791 visit_type_str(m, obj ? &(*obj)->sock : NULL((void*)0), "sock", &err);
3792 }
3793 visit_end_optional(m, &err);
3794 visit_start_optional(m, obj ? &(*obj)->has_port : NULL((void*)0), "port", &err);
3795 if (obj && (*obj)->has_port) {
3796 visit_type_uint16(m, obj ? &(*obj)->port : NULL((void*)0), "port", &err);
3797 }
3798 visit_end_optional(m, &err);
3799 visit_start_optional(m, obj ? &(*obj)->has_group : NULL((void*)0), "group", &err);
3800 if (obj && (*obj)->has_group) {
3801 visit_type_str(m, obj ? &(*obj)->group : NULL((void*)0), "group", &err);
3802 }
3803 visit_end_optional(m, &err);
3804 visit_start_optional(m, obj ? &(*obj)->has_mode : NULL((void*)0), "mode", &err);
3805 if (obj && (*obj)->has_mode) {
3806 visit_type_uint16(m, obj ? &(*obj)->mode : NULL((void*)0), "mode", &err);
3807 }
3808 visit_end_optional(m, &err);
3809
3810 error_propagate(errp, err);
3811}
3812
3813void visit_type_NetdevVdeOptions(Visitor *m, NetdevVdeOptions ** obj, const char *name, Error **errp)
3814{
3815 if (!error_is_set(errp)) {
3816 Error *err = NULL((void*)0);
3817 visit_start_struct(m, (void **)obj, "NetdevVdeOptions", name, sizeof(NetdevVdeOptions), &err);
3818 if (!err) {
3819 if (!obj || *obj) {
3820 visit_type_NetdevVdeOptions_fields(m, obj, &err);
3821 error_propagate(errp, err);
3822 err = NULL((void*)0);
3823 }
3824 /* Always call end_struct if start_struct succeeded. */
3825 visit_end_struct(m, &err);
3826 }
3827 error_propagate(errp, err);
3828 }
3829}
3830
3831void visit_type_NetdevVdeOptionsList(Visitor *m, NetdevVdeOptionsList ** obj, const char *name, Error **errp)
3832{
3833 GenericList *i, **prev = (GenericList **)obj;
3834 Error *err = NULL((void*)0);
3835
3836 if (!error_is_set(errp)) {
3837 visit_start_list(m, name, &err);
3838 if (!err) {
3839 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3840 NetdevVdeOptionsList *native_i = (NetdevVdeOptionsList *)i;
3841 visit_type_NetdevVdeOptions(m, &native_i->value, NULL((void*)0), &err);
3842 }
3843 error_propagate(errp, err);
3844 err = NULL((void*)0);
3845
3846 /* Always call end_list if start_list succeeded. */
3847 visit_end_list(m, &err);
3848 }
3849 error_propagate(errp, err);
3850 }
3851}
3852
3853static void visit_type_NetdevDumpOptions_fields(Visitor *m, NetdevDumpOptions ** obj, Error **errp)
3854{
3855 Error *err = NULL((void*)0);
3856 visit_start_optional(m, obj ? &(*obj)->has_len : NULL((void*)0), "len", &err);
3857 if (obj && (*obj)->has_len) {
3858 visit_type_size(m, obj ? &(*obj)->len : NULL((void*)0), "len", &err);
3859 }
3860 visit_end_optional(m, &err);
3861 visit_start_optional(m, obj ? &(*obj)->has_file : NULL((void*)0), "file", &err);
3862 if (obj && (*obj)->has_file) {
3863 visit_type_str(m, obj ? &(*obj)->file : NULL((void*)0), "file", &err);
3864 }
3865 visit_end_optional(m, &err);
3866
3867 error_propagate(errp, err);
3868}
3869
3870void visit_type_NetdevDumpOptions(Visitor *m, NetdevDumpOptions ** obj, const char *name, Error **errp)
3871{
3872 if (!error_is_set(errp)) {
3873 Error *err = NULL((void*)0);
3874 visit_start_struct(m, (void **)obj, "NetdevDumpOptions", name, sizeof(NetdevDumpOptions), &err);
3875 if (!err) {
3876 if (!obj || *obj) {
3877 visit_type_NetdevDumpOptions_fields(m, obj, &err);
3878 error_propagate(errp, err);
3879 err = NULL((void*)0);
3880 }
3881 /* Always call end_struct if start_struct succeeded. */
3882 visit_end_struct(m, &err);
3883 }
3884 error_propagate(errp, err);
3885 }
3886}
3887
3888void visit_type_NetdevDumpOptionsList(Visitor *m, NetdevDumpOptionsList ** obj, const char *name, Error **errp)
3889{
3890 GenericList *i, **prev = (GenericList **)obj;
3891 Error *err = NULL((void*)0);
3892
3893 if (!error_is_set(errp)) {
3894 visit_start_list(m, name, &err);
3895 if (!err) {
3896 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3897 NetdevDumpOptionsList *native_i = (NetdevDumpOptionsList *)i;
3898 visit_type_NetdevDumpOptions(m, &native_i->value, NULL((void*)0), &err);
3899 }
3900 error_propagate(errp, err);
3901 err = NULL((void*)0);
3902
3903 /* Always call end_list if start_list succeeded. */
3904 visit_end_list(m, &err);
3905 }
3906 error_propagate(errp, err);
3907 }
3908}
3909
3910static void visit_type_NetdevBridgeOptions_fields(Visitor *m, NetdevBridgeOptions ** obj, Error **errp)
3911{
3912 Error *err = NULL((void*)0);
3913 visit_start_optional(m, obj ? &(*obj)->has_br : NULL((void*)0), "br", &err);
3914 if (obj && (*obj)->has_br) {
3915 visit_type_str(m, obj ? &(*obj)->br : NULL((void*)0), "br", &err);
3916 }
3917 visit_end_optional(m, &err);
3918 visit_start_optional(m, obj ? &(*obj)->has_helper : NULL((void*)0), "helper", &err);
3919 if (obj && (*obj)->has_helper) {
3920 visit_type_str(m, obj ? &(*obj)->helper : NULL((void*)0), "helper", &err);
3921 }
3922 visit_end_optional(m, &err);
3923
3924 error_propagate(errp, err);
3925}
3926
3927void visit_type_NetdevBridgeOptions(Visitor *m, NetdevBridgeOptions ** obj, const char *name, Error **errp)
3928{
3929 if (!error_is_set(errp)) {
3930 Error *err = NULL((void*)0);
3931 visit_start_struct(m, (void **)obj, "NetdevBridgeOptions", name, sizeof(NetdevBridgeOptions), &err);
3932 if (!err) {
3933 if (!obj || *obj) {
3934 visit_type_NetdevBridgeOptions_fields(m, obj, &err);
3935 error_propagate(errp, err);
3936 err = NULL((void*)0);
3937 }
3938 /* Always call end_struct if start_struct succeeded. */
3939 visit_end_struct(m, &err);
3940 }
3941 error_propagate(errp, err);
3942 }
3943}
3944
3945void visit_type_NetdevBridgeOptionsList(Visitor *m, NetdevBridgeOptionsList ** obj, const char *name, Error **errp)
3946{
3947 GenericList *i, **prev = (GenericList **)obj;
3948 Error *err = NULL((void*)0);
3949
3950 if (!error_is_set(errp)) {
3951 visit_start_list(m, name, &err);
3952 if (!err) {
3953 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
3954 NetdevBridgeOptionsList *native_i = (NetdevBridgeOptionsList *)i;
3955 visit_type_NetdevBridgeOptions(m, &native_i->value, NULL((void*)0), &err);
3956 }
3957 error_propagate(errp, err);
3958 err = NULL((void*)0);
3959
3960 /* Always call end_list if start_list succeeded. */
3961 visit_end_list(m, &err);
3962 }
3963 error_propagate(errp, err);
3964 }
3965}
3966
3967static void visit_type_NetdevHubPortOptions_fields(Visitor *m, NetdevHubPortOptions ** obj, Error **errp)
3968{
3969 Error *err = NULL((void*)0);
3970 visit_type_int32(m, obj ? &(*obj)->hubid : NULL((void*)0), "hubid", &err);
3971
3972 error_propagate(errp, err);
3973}
3974
3975void visit_type_NetdevHubPortOptions(Visitor *m, NetdevHubPortOptions ** obj, const char *name, Error **errp)
3976{
3977 if (!error_is_set(errp)) {
3978 Error *err = NULL((void*)0);
3979 visit_start_struct(m, (void **)obj, "NetdevHubPortOptions", name, sizeof(NetdevHubPortOptions), &err);
3980 if (!err) {
3981 if (!obj || *obj) {
3982 visit_type_NetdevHubPortOptions_fields(m, obj, &err);
3983 error_propagate(errp, err);
3984 err = NULL((void*)0);
3985 }
3986 /* Always call end_struct if start_struct succeeded. */
3987 visit_end_struct(m, &err);
3988 }
3989 error_propagate(errp, err);
3990 }
3991}
3992
3993void visit_type_NetdevHubPortOptionsList(Visitor *m, NetdevHubPortOptionsList ** obj, const char *name, Error **errp)
3994{
3995 GenericList *i, **prev = (GenericList **)obj;
3996 Error *err = NULL((void*)0);
3997
3998 if (!error_is_set(errp)) {
3999 visit_start_list(m, name, &err);
4000 if (!err) {
4001 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4002 NetdevHubPortOptionsList *native_i = (NetdevHubPortOptionsList *)i;
4003 visit_type_NetdevHubPortOptions(m, &native_i->value, NULL((void*)0), &err);
4004 }
4005 error_propagate(errp, err);
4006 err = NULL((void*)0);
4007
4008 /* Always call end_list if start_list succeeded. */
4009 visit_end_list(m, &err);
4010 }
4011 error_propagate(errp, err);
4012 }
4013}
4014
4015static void visit_type_NetdevNetmapOptions_fields(Visitor *m, NetdevNetmapOptions ** obj, Error **errp)
4016{
4017 Error *err = NULL((void*)0);
4018 visit_type_str(m, obj ? &(*obj)->ifname : NULL((void*)0), "ifname", &err);
4019 visit_start_optional(m, obj ? &(*obj)->has_devname : NULL((void*)0), "devname", &err);
4020 if (obj && (*obj)->has_devname) {
4021 visit_type_str(m, obj ? &(*obj)->devname : NULL((void*)0), "devname", &err);
4022 }
4023 visit_end_optional(m, &err);
4024
4025 error_propagate(errp, err);
4026}
4027
4028void visit_type_NetdevNetmapOptions(Visitor *m, NetdevNetmapOptions ** obj, const char *name, Error **errp)
4029{
4030 if (!error_is_set(errp)) {
4031 Error *err = NULL((void*)0);
4032 visit_start_struct(m, (void **)obj, "NetdevNetmapOptions", name, sizeof(NetdevNetmapOptions), &err);
4033 if (!err) {
4034 if (!obj || *obj) {
4035 visit_type_NetdevNetmapOptions_fields(m, obj, &err);
4036 error_propagate(errp, err);
4037 err = NULL((void*)0);
4038 }
4039 /* Always call end_struct if start_struct succeeded. */
4040 visit_end_struct(m, &err);
4041 }
4042 error_propagate(errp, err);
4043 }
4044}
4045
4046void visit_type_NetdevNetmapOptionsList(Visitor *m, NetdevNetmapOptionsList ** obj, const char *name, Error **errp)
4047{
4048 GenericList *i, **prev = (GenericList **)obj;
4049 Error *err = NULL((void*)0);
4050
4051 if (!error_is_set(errp)) {
4052 visit_start_list(m, name, &err);
4053 if (!err) {
4054 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4055 NetdevNetmapOptionsList *native_i = (NetdevNetmapOptionsList *)i;
4056 visit_type_NetdevNetmapOptions(m, &native_i->value, NULL((void*)0), &err);
4057 }
4058 error_propagate(errp, err);
4059 err = NULL((void*)0);
4060
4061 /* Always call end_list if start_list succeeded. */
4062 visit_end_list(m, &err);
4063 }
4064 error_propagate(errp, err);
4065 }
4066}
4067
4068void visit_type_NetClientOptionsKind(Visitor *m, NetClientOptionsKind * obj, const char *name, Error **errp)
4069{
4070 visit_type_enum(m, (int *)obj, NetClientOptionsKind_lookup, "NetClientOptionsKind", name, errp);
4071}
4072
4073void visit_type_NetClientOptions(Visitor *m, NetClientOptions ** obj, const char *name, Error **errp)
4074{
4075 Error *err = NULL((void*)0);
4076
4077 if (!error_is_set(errp)) {
4078 visit_start_struct(m, (void **)obj, "NetClientOptions", name, sizeof(NetClientOptions), &err);
4079 if (!err) {
4080 if (obj && *obj) {
4081 visit_type_NetClientOptionsKind(m, &(*obj)->kind, "type", &err);
4082 if (!err) {
4083 switch ((*obj)->kind) {
4084 case NET_CLIENT_OPTIONS_KIND_NONE:
4085 visit_type_NetdevNoneOptions(m, &(*obj)->none, "data", &err);
4086 break;
4087 case NET_CLIENT_OPTIONS_KIND_NIC:
4088 visit_type_NetLegacyNicOptions(m, &(*obj)->nic, "data", &err);
4089 break;
4090 case NET_CLIENT_OPTIONS_KIND_USER:
4091 visit_type_NetdevUserOptions(m, &(*obj)->user, "data", &err);
4092 break;
4093 case NET_CLIENT_OPTIONS_KIND_TAP:
4094 visit_type_NetdevTapOptions(m, &(*obj)->tap, "data", &err);
4095 break;
4096 case NET_CLIENT_OPTIONS_KIND_SOCKET:
4097 visit_type_NetdevSocketOptions(m, &(*obj)->socket, "data", &err);
4098 break;
4099 case NET_CLIENT_OPTIONS_KIND_VDE:
4100 visit_type_NetdevVdeOptions(m, &(*obj)->vde, "data", &err);
4101 break;
4102 case NET_CLIENT_OPTIONS_KIND_DUMP:
4103 visit_type_NetdevDumpOptions(m, &(*obj)->dump, "data", &err);
4104 break;
4105 case NET_CLIENT_OPTIONS_KIND_BRIDGE:
4106 visit_type_NetdevBridgeOptions(m, &(*obj)->bridge, "data", &err);
4107 break;
4108 case NET_CLIENT_OPTIONS_KIND_HUBPORT:
4109 visit_type_NetdevHubPortOptions(m, &(*obj)->hubport, "data", &err);
4110 break;
4111 case NET_CLIENT_OPTIONS_KIND_NETMAP:
4112 visit_type_NetdevNetmapOptions(m, &(*obj)->netmap, "data", &err);
4113 break;
4114 default:
4115 abort();
4116 }
4117 }
4118 error_propagate(errp, err);
4119 err = NULL((void*)0);
4120 }
4121 /* Always call end_struct if start_struct succeeded. */
4122 visit_end_struct(m, &err);
4123 }
4124 error_propagate(errp, err);
4125 }
4126}
4127
4128void visit_type_NetClientOptionsList(Visitor *m, NetClientOptionsList ** obj, const char *name, Error **errp)
4129{
4130 GenericList *i, **prev = (GenericList **)obj;
4131 Error *err = NULL((void*)0);
4132
4133 if (!error_is_set(errp)) {
4134 visit_start_list(m, name, &err);
4135 if (!err) {
4136 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4137 NetClientOptionsList *native_i = (NetClientOptionsList *)i;
4138 visit_type_NetClientOptions(m, &native_i->value, NULL((void*)0), &err);
4139 }
4140 error_propagate(errp, err);
4141 err = NULL((void*)0);
4142
4143 /* Always call end_list if start_list succeeded. */
4144 visit_end_list(m, &err);
4145 }
4146 error_propagate(errp, err);
4147 }
4148}
4149
4150static void visit_type_NetLegacy_fields(Visitor *m, NetLegacy ** obj, Error **errp)
4151{
4152 Error *err = NULL((void*)0);
4153 visit_start_optional(m, obj ? &(*obj)->has_vlan : NULL((void*)0), "vlan", &err);
4154 if (obj && (*obj)->has_vlan) {
4155 visit_type_int32(m, obj ? &(*obj)->vlan : NULL((void*)0), "vlan", &err);
4156 }
4157 visit_end_optional(m, &err);
4158 visit_start_optional(m, obj ? &(*obj)->has_id : NULL((void*)0), "id", &err);
4159 if (obj && (*obj)->has_id) {
4160 visit_type_str(m, obj ? &(*obj)->id : NULL((void*)0), "id", &err);
4161 }
4162 visit_end_optional(m, &err);
4163 visit_start_optional(m, obj ? &(*obj)->has_name : NULL((void*)0), "name", &err);
4164 if (obj && (*obj)->has_name) {
4165 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
4166 }
4167 visit_end_optional(m, &err);
4168 visit_type_NetClientOptions(m, obj ? &(*obj)->opts : NULL((void*)0), "opts", &err);
4169
4170 error_propagate(errp, err);
4171}
4172
4173void visit_type_NetLegacy(Visitor *m, NetLegacy ** obj, const char *name, Error **errp)
4174{
4175 if (!error_is_set(errp)) {
4176 Error *err = NULL((void*)0);
4177 visit_start_struct(m, (void **)obj, "NetLegacy", name, sizeof(NetLegacy), &err);
4178 if (!err) {
4179 if (!obj || *obj) {
4180 visit_type_NetLegacy_fields(m, obj, &err);
4181 error_propagate(errp, err);
4182 err = NULL((void*)0);
4183 }
4184 /* Always call end_struct if start_struct succeeded. */
4185 visit_end_struct(m, &err);
4186 }
4187 error_propagate(errp, err);
4188 }
4189}
4190
4191void visit_type_NetLegacyList(Visitor *m, NetLegacyList ** obj, const char *name, Error **errp)
4192{
4193 GenericList *i, **prev = (GenericList **)obj;
4194 Error *err = NULL((void*)0);
4195
4196 if (!error_is_set(errp)) {
4197 visit_start_list(m, name, &err);
4198 if (!err) {
4199 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4200 NetLegacyList *native_i = (NetLegacyList *)i;
4201 visit_type_NetLegacy(m, &native_i->value, NULL((void*)0), &err);
4202 }
4203 error_propagate(errp, err);
4204 err = NULL((void*)0);
4205
4206 /* Always call end_list if start_list succeeded. */
4207 visit_end_list(m, &err);
4208 }
4209 error_propagate(errp, err);
4210 }
4211}
4212
4213static void visit_type_Netdev_fields(Visitor *m, Netdev ** obj, Error **errp)
4214{
4215 Error *err = NULL((void*)0);
4216 visit_type_str(m, obj ? &(*obj)->id : NULL((void*)0), "id", &err);
4217 visit_type_NetClientOptions(m, obj ? &(*obj)->opts : NULL((void*)0), "opts", &err);
4218
4219 error_propagate(errp, err);
4220}
4221
4222void visit_type_Netdev(Visitor *m, Netdev ** obj, const char *name, Error **errp)
4223{
4224 if (!error_is_set(errp)) {
4225 Error *err = NULL((void*)0);
4226 visit_start_struct(m, (void **)obj, "Netdev", name, sizeof(Netdev), &err);
4227 if (!err) {
4228 if (!obj || *obj) {
4229 visit_type_Netdev_fields(m, obj, &err);
4230 error_propagate(errp, err);
4231 err = NULL((void*)0);
4232 }
4233 /* Always call end_struct if start_struct succeeded. */
4234 visit_end_struct(m, &err);
4235 }
4236 error_propagate(errp, err);
4237 }
4238}
4239
4240void visit_type_NetdevList(Visitor *m, NetdevList ** obj, const char *name, Error **errp)
4241{
4242 GenericList *i, **prev = (GenericList **)obj;
4243 Error *err = NULL((void*)0);
4244
4245 if (!error_is_set(errp)) {
4246 visit_start_list(m, name, &err);
4247 if (!err) {
4248 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4249 NetdevList *native_i = (NetdevList *)i;
4250 visit_type_Netdev(m, &native_i->value, NULL((void*)0), &err);
4251 }
4252 error_propagate(errp, err);
4253 err = NULL((void*)0);
4254
4255 /* Always call end_list if start_list succeeded. */
4256 visit_end_list(m, &err);
4257 }
4258 error_propagate(errp, err);
4259 }
4260}
4261
4262static void visit_type_InetSocketAddress_fields(Visitor *m, InetSocketAddress ** obj, Error **errp)
4263{
4264 Error *err = NULL((void*)0);
4265 visit_type_str(m, obj ? &(*obj)->host : NULL((void*)0), "host", &err);
4266 visit_type_str(m, obj ? &(*obj)->port : NULL((void*)0), "port", &err);
4267 visit_start_optional(m, obj ? &(*obj)->has_to : NULL((void*)0), "to", &err);
4268 if (obj && (*obj)->has_to) {
4269 visit_type_uint16(m, obj ? &(*obj)->to : NULL((void*)0), "to", &err);
4270 }
4271 visit_end_optional(m, &err);
4272 visit_start_optional(m, obj ? &(*obj)->has_ipv4 : NULL((void*)0), "ipv4", &err);
4273 if (obj && (*obj)->has_ipv4) {
4274 visit_type_bool(m, obj ? &(*obj)->ipv4 : NULL((void*)0), "ipv4", &err);
4275 }
4276 visit_end_optional(m, &err);
4277 visit_start_optional(m, obj ? &(*obj)->has_ipv6 : NULL((void*)0), "ipv6", &err);
4278 if (obj && (*obj)->has_ipv6) {
4279 visit_type_bool(m, obj ? &(*obj)->ipv6 : NULL((void*)0), "ipv6", &err);
4280 }
4281 visit_end_optional(m, &err);
4282
4283 error_propagate(errp, err);
4284}
4285
4286void visit_type_InetSocketAddress(Visitor *m, InetSocketAddress ** obj, const char *name, Error **errp)
4287{
4288 if (!error_is_set(errp)) {
4289 Error *err = NULL((void*)0);
4290 visit_start_struct(m, (void **)obj, "InetSocketAddress", name, sizeof(InetSocketAddress), &err);
4291 if (!err) {
4292 if (!obj || *obj) {
4293 visit_type_InetSocketAddress_fields(m, obj, &err);
4294 error_propagate(errp, err);
4295 err = NULL((void*)0);
4296 }
4297 /* Always call end_struct if start_struct succeeded. */
4298 visit_end_struct(m, &err);
4299 }
4300 error_propagate(errp, err);
4301 }
4302}
4303
4304void visit_type_InetSocketAddressList(Visitor *m, InetSocketAddressList ** obj, const char *name, Error **errp)
4305{
4306 GenericList *i, **prev = (GenericList **)obj;
4307 Error *err = NULL((void*)0);
4308
4309 if (!error_is_set(errp)) {
4310 visit_start_list(m, name, &err);
4311 if (!err) {
4312 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4313 InetSocketAddressList *native_i = (InetSocketAddressList *)i;
4314 visit_type_InetSocketAddress(m, &native_i->value, NULL((void*)0), &err);
4315 }
4316 error_propagate(errp, err);
4317 err = NULL((void*)0);
4318
4319 /* Always call end_list if start_list succeeded. */
4320 visit_end_list(m, &err);
4321 }
4322 error_propagate(errp, err);
4323 }
4324}
4325
4326static void visit_type_UnixSocketAddress_fields(Visitor *m, UnixSocketAddress ** obj, Error **errp)
4327{
4328 Error *err = NULL((void*)0);
4329 visit_type_str(m, obj ? &(*obj)->path : NULL((void*)0), "path", &err);
4330
4331 error_propagate(errp, err);
4332}
4333
4334void visit_type_UnixSocketAddress(Visitor *m, UnixSocketAddress ** obj, const char *name, Error **errp)
4335{
4336 if (!error_is_set(errp)) {
4337 Error *err = NULL((void*)0);
4338 visit_start_struct(m, (void **)obj, "UnixSocketAddress", name, sizeof(UnixSocketAddress), &err);
4339 if (!err) {
4340 if (!obj || *obj) {
4341 visit_type_UnixSocketAddress_fields(m, obj, &err);
4342 error_propagate(errp, err);
4343 err = NULL((void*)0);
4344 }
4345 /* Always call end_struct if start_struct succeeded. */
4346 visit_end_struct(m, &err);
4347 }
4348 error_propagate(errp, err);
4349 }
4350}
4351
4352void visit_type_UnixSocketAddressList(Visitor *m, UnixSocketAddressList ** obj, const char *name, Error **errp)
4353{
4354 GenericList *i, **prev = (GenericList **)obj;
4355 Error *err = NULL((void*)0);
4356
4357 if (!error_is_set(errp)) {
4358 visit_start_list(m, name, &err);
4359 if (!err) {
4360 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4361 UnixSocketAddressList *native_i = (UnixSocketAddressList *)i;
4362 visit_type_UnixSocketAddress(m, &native_i->value, NULL((void*)0), &err);
4363 }
4364 error_propagate(errp, err);
4365 err = NULL((void*)0);
4366
4367 /* Always call end_list if start_list succeeded. */
4368 visit_end_list(m, &err);
4369 }
4370 error_propagate(errp, err);
4371 }
4372}
4373
4374void visit_type_SocketAddressKind(Visitor *m, SocketAddressKind * obj, const char *name, Error **errp)
4375{
4376 visit_type_enum(m, (int *)obj, SocketAddressKind_lookup, "SocketAddressKind", name, errp);
4377}
4378
4379void visit_type_SocketAddress(Visitor *m, SocketAddress ** obj, const char *name, Error **errp)
4380{
4381 Error *err = NULL((void*)0);
4382
4383 if (!error_is_set(errp)) {
4384 visit_start_struct(m, (void **)obj, "SocketAddress", name, sizeof(SocketAddress), &err);
4385 if (!err) {
4386 if (obj && *obj) {
4387 visit_type_SocketAddressKind(m, &(*obj)->kind, "type", &err);
4388 if (!err) {
4389 switch ((*obj)->kind) {
4390 case SOCKET_ADDRESS_KIND_INET:
4391 visit_type_InetSocketAddress(m, &(*obj)->inet, "data", &err);
4392 break;
4393 case SOCKET_ADDRESS_KIND_UNIX:
4394 visit_type_UnixSocketAddress(m, &(*obj)->q_unix, "data", &err);
4395 break;
4396 case SOCKET_ADDRESS_KIND_FD:
4397 visit_type_String(m, &(*obj)->fd, "data", &err);
4398 break;
4399 default:
4400 abort();
4401 }
4402 }
4403 error_propagate(errp, err);
4404 err = NULL((void*)0);
4405 }
4406 /* Always call end_struct if start_struct succeeded. */
4407 visit_end_struct(m, &err);
4408 }
4409 error_propagate(errp, err);
4410 }
4411}
4412
4413void visit_type_SocketAddressList(Visitor *m, SocketAddressList ** obj, const char *name, Error **errp)
4414{
4415 GenericList *i, **prev = (GenericList **)obj;
4416 Error *err = NULL((void*)0);
4417
4418 if (!error_is_set(errp)) {
4419 visit_start_list(m, name, &err);
4420 if (!err) {
4421 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4422 SocketAddressList *native_i = (SocketAddressList *)i;
4423 visit_type_SocketAddress(m, &native_i->value, NULL((void*)0), &err);
4424 }
4425 error_propagate(errp, err);
4426 err = NULL((void*)0);
4427
4428 /* Always call end_list if start_list succeeded. */
4429 visit_end_list(m, &err);
4430 }
4431 error_propagate(errp, err);
4432 }
4433}
4434
4435static void visit_type_MachineInfo_fields(Visitor *m, MachineInfo ** obj, Error **errp)
4436{
4437 Error *err = NULL((void*)0);
4438 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
4439 visit_start_optional(m, obj ? &(*obj)->has_alias : NULL((void*)0), "alias", &err);
4440 if (obj && (*obj)->has_alias) {
4441 visit_type_str(m, obj ? &(*obj)->alias : NULL((void*)0), "alias", &err);
4442 }
4443 visit_end_optional(m, &err);
4444 visit_start_optional(m, obj ? &(*obj)->has_is_default : NULL((void*)0), "is-default", &err);
4445 if (obj && (*obj)->has_is_default) {
4446 visit_type_bool(m, obj ? &(*obj)->is_default : NULL((void*)0), "is-default", &err);
4447 }
4448 visit_end_optional(m, &err);
4449 visit_type_int(m, obj ? &(*obj)->cpu_max : NULL((void*)0), "cpu-max", &err);
4450
4451 error_propagate(errp, err);
4452}
4453
4454void visit_type_MachineInfo(Visitor *m, MachineInfo ** obj, const char *name, Error **errp)
4455{
4456 if (!error_is_set(errp)) {
4457 Error *err = NULL((void*)0);
4458 visit_start_struct(m, (void **)obj, "MachineInfo", name, sizeof(MachineInfo), &err);
4459 if (!err) {
4460 if (!obj || *obj) {
4461 visit_type_MachineInfo_fields(m, obj, &err);
4462 error_propagate(errp, err);
4463 err = NULL((void*)0);
4464 }
4465 /* Always call end_struct if start_struct succeeded. */
4466 visit_end_struct(m, &err);
4467 }
4468 error_propagate(errp, err);
4469 }
4470}
4471
4472void visit_type_MachineInfoList(Visitor *m, MachineInfoList ** obj, const char *name, Error **errp)
4473{
4474 GenericList *i, **prev = (GenericList **)obj;
4475 Error *err = NULL((void*)0);
4476
4477 if (!error_is_set(errp)) {
4478 visit_start_list(m, name, &err);
4479 if (!err) {
4480 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4481 MachineInfoList *native_i = (MachineInfoList *)i;
4482 visit_type_MachineInfo(m, &native_i->value, NULL((void*)0), &err);
4483 }
4484 error_propagate(errp, err);
4485 err = NULL((void*)0);
4486
4487 /* Always call end_list if start_list succeeded. */
4488 visit_end_list(m, &err);
4489 }
4490 error_propagate(errp, err);
4491 }
4492}
4493
4494static void visit_type_CpuDefinitionInfo_fields(Visitor *m, CpuDefinitionInfo ** obj, Error **errp)
4495{
4496 Error *err = NULL((void*)0);
4497 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
4498
4499 error_propagate(errp, err);
4500}
4501
4502void visit_type_CpuDefinitionInfo(Visitor *m, CpuDefinitionInfo ** obj, const char *name, Error **errp)
4503{
4504 if (!error_is_set(errp)) {
4505 Error *err = NULL((void*)0);
4506 visit_start_struct(m, (void **)obj, "CpuDefinitionInfo", name, sizeof(CpuDefinitionInfo), &err);
4507 if (!err) {
4508 if (!obj || *obj) {
4509 visit_type_CpuDefinitionInfo_fields(m, obj, &err);
4510 error_propagate(errp, err);
4511 err = NULL((void*)0);
4512 }
4513 /* Always call end_struct if start_struct succeeded. */
4514 visit_end_struct(m, &err);
4515 }
4516 error_propagate(errp, err);
4517 }
4518}
4519
4520void visit_type_CpuDefinitionInfoList(Visitor *m, CpuDefinitionInfoList ** obj, const char *name, Error **errp)
4521{
4522 GenericList *i, **prev = (GenericList **)obj;
4523 Error *err = NULL((void*)0);
4524
4525 if (!error_is_set(errp)) {
4526 visit_start_list(m, name, &err);
4527 if (!err) {
4528 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4529 CpuDefinitionInfoList *native_i = (CpuDefinitionInfoList *)i;
4530 visit_type_CpuDefinitionInfo(m, &native_i->value, NULL((void*)0), &err);
4531 }
4532 error_propagate(errp, err);
4533 err = NULL((void*)0);
4534
4535 /* Always call end_list if start_list succeeded. */
4536 visit_end_list(m, &err);
4537 }
4538 error_propagate(errp, err);
4539 }
4540}
4541
4542static void visit_type_AddfdInfo_fields(Visitor *m, AddfdInfo ** obj, Error **errp)
4543{
4544 Error *err = NULL((void*)0);
4545 visit_type_int(m, obj ? &(*obj)->fdset_id : NULL((void*)0), "fdset-id", &err);
4546 visit_type_int(m, obj ? &(*obj)->fd : NULL((void*)0), "fd", &err);
4547
4548 error_propagate(errp, err);
4549}
4550
4551void visit_type_AddfdInfo(Visitor *m, AddfdInfo ** obj, const char *name, Error **errp)
4552{
4553 if (!error_is_set(errp)) {
4554 Error *err = NULL((void*)0);
4555 visit_start_struct(m, (void **)obj, "AddfdInfo", name, sizeof(AddfdInfo), &err);
4556 if (!err) {
4557 if (!obj || *obj) {
4558 visit_type_AddfdInfo_fields(m, obj, &err);
4559 error_propagate(errp, err);
4560 err = NULL((void*)0);
4561 }
4562 /* Always call end_struct if start_struct succeeded. */
4563 visit_end_struct(m, &err);
4564 }
4565 error_propagate(errp, err);
4566 }
4567}
4568
4569void visit_type_AddfdInfoList(Visitor *m, AddfdInfoList ** obj, const char *name, Error **errp)
4570{
4571 GenericList *i, **prev = (GenericList **)obj;
4572 Error *err = NULL((void*)0);
4573
4574 if (!error_is_set(errp)) {
4575 visit_start_list(m, name, &err);
4576 if (!err) {
4577 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4578 AddfdInfoList *native_i = (AddfdInfoList *)i;
4579 visit_type_AddfdInfo(m, &native_i->value, NULL((void*)0), &err);
4580 }
4581 error_propagate(errp, err);
4582 err = NULL((void*)0);
4583
4584 /* Always call end_list if start_list succeeded. */
4585 visit_end_list(m, &err);
4586 }
4587 error_propagate(errp, err);
4588 }
4589}
4590
4591static void visit_type_FdsetFdInfo_fields(Visitor *m, FdsetFdInfo ** obj, Error **errp)
4592{
4593 Error *err = NULL((void*)0);
4594 visit_type_int(m, obj ? &(*obj)->fd : NULL((void*)0), "fd", &err);
4595 visit_start_optional(m, obj ? &(*obj)->has_opaque : NULL((void*)0), "opaque", &err);
4596 if (obj && (*obj)->has_opaque) {
4597 visit_type_str(m, obj ? &(*obj)->opaque : NULL((void*)0), "opaque", &err);
4598 }
4599 visit_end_optional(m, &err);
4600
4601 error_propagate(errp, err);
4602}
4603
4604void visit_type_FdsetFdInfo(Visitor *m, FdsetFdInfo ** obj, const char *name, Error **errp)
4605{
4606 if (!error_is_set(errp)) {
4607 Error *err = NULL((void*)0);
4608 visit_start_struct(m, (void **)obj, "FdsetFdInfo", name, sizeof(FdsetFdInfo), &err);
4609 if (!err) {
4610 if (!obj || *obj) {
4611 visit_type_FdsetFdInfo_fields(m, obj, &err);
4612 error_propagate(errp, err);
4613 err = NULL((void*)0);
4614 }
4615 /* Always call end_struct if start_struct succeeded. */
4616 visit_end_struct(m, &err);
4617 }
4618 error_propagate(errp, err);
4619 }
4620}
4621
4622void visit_type_FdsetFdInfoList(Visitor *m, FdsetFdInfoList ** obj, const char *name, Error **errp)
4623{
4624 GenericList *i, **prev = (GenericList **)obj;
4625 Error *err = NULL((void*)0);
4626
4627 if (!error_is_set(errp)) {
4628 visit_start_list(m, name, &err);
4629 if (!err) {
4630 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4631 FdsetFdInfoList *native_i = (FdsetFdInfoList *)i;
4632 visit_type_FdsetFdInfo(m, &native_i->value, NULL((void*)0), &err);
4633 }
4634 error_propagate(errp, err);
4635 err = NULL((void*)0);
4636
4637 /* Always call end_list if start_list succeeded. */
4638 visit_end_list(m, &err);
4639 }
4640 error_propagate(errp, err);
4641 }
4642}
4643
4644static void visit_type_FdsetInfo_fields(Visitor *m, FdsetInfo ** obj, Error **errp)
4645{
4646 Error *err = NULL((void*)0);
4647 visit_type_int(m, obj ? &(*obj)->fdset_id : NULL((void*)0), "fdset-id", &err);
4648 visit_type_FdsetFdInfoList(m, obj ? &(*obj)->fds : NULL((void*)0), "fds", &err);
4649
4650 error_propagate(errp, err);
4651}
4652
4653void visit_type_FdsetInfo(Visitor *m, FdsetInfo ** obj, const char *name, Error **errp)
4654{
4655 if (!error_is_set(errp)) {
4656 Error *err = NULL((void*)0);
4657 visit_start_struct(m, (void **)obj, "FdsetInfo", name, sizeof(FdsetInfo), &err);
4658 if (!err) {
4659 if (!obj || *obj) {
4660 visit_type_FdsetInfo_fields(m, obj, &err);
4661 error_propagate(errp, err);
4662 err = NULL((void*)0);
4663 }
4664 /* Always call end_struct if start_struct succeeded. */
4665 visit_end_struct(m, &err);
4666 }
4667 error_propagate(errp, err);
4668 }
4669}
4670
4671void visit_type_FdsetInfoList(Visitor *m, FdsetInfoList ** obj, const char *name, Error **errp)
4672{
4673 GenericList *i, **prev = (GenericList **)obj;
4674 Error *err = NULL((void*)0);
4675
4676 if (!error_is_set(errp)) {
4677 visit_start_list(m, name, &err);
4678 if (!err) {
4679 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4680 FdsetInfoList *native_i = (FdsetInfoList *)i;
4681 visit_type_FdsetInfo(m, &native_i->value, NULL((void*)0), &err);
4682 }
4683 error_propagate(errp, err);
4684 err = NULL((void*)0);
4685
4686 /* Always call end_list if start_list succeeded. */
4687 visit_end_list(m, &err);
4688 }
4689 error_propagate(errp, err);
4690 }
4691}
4692
4693static void visit_type_TargetInfo_fields(Visitor *m, TargetInfo ** obj, Error **errp)
4694{
4695 Error *err = NULL((void*)0);
4696 visit_type_str(m, obj ? &(*obj)->arch : NULL((void*)0), "arch", &err);
4697
4698 error_propagate(errp, err);
4699}
4700
4701void visit_type_TargetInfo(Visitor *m, TargetInfo ** obj, const char *name, Error **errp)
4702{
4703 if (!error_is_set(errp)) {
4704 Error *err = NULL((void*)0);
4705 visit_start_struct(m, (void **)obj, "TargetInfo", name, sizeof(TargetInfo), &err);
4706 if (!err) {
4707 if (!obj || *obj) {
4708 visit_type_TargetInfo_fields(m, obj, &err);
4709 error_propagate(errp, err);
4710 err = NULL((void*)0);
4711 }
4712 /* Always call end_struct if start_struct succeeded. */
4713 visit_end_struct(m, &err);
4714 }
4715 error_propagate(errp, err);
4716 }
4717}
4718
4719void visit_type_TargetInfoList(Visitor *m, TargetInfoList ** obj, const char *name, Error **errp)
4720{
4721 GenericList *i, **prev = (GenericList **)obj;
4722 Error *err = NULL((void*)0);
4723
4724 if (!error_is_set(errp)) {
4725 visit_start_list(m, name, &err);
4726 if (!err) {
4727 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4728 TargetInfoList *native_i = (TargetInfoList *)i;
4729 visit_type_TargetInfo(m, &native_i->value, NULL((void*)0), &err);
4730 }
4731 error_propagate(errp, err);
4732 err = NULL((void*)0);
4733
4734 /* Always call end_list if start_list succeeded. */
4735 visit_end_list(m, &err);
4736 }
4737 error_propagate(errp, err);
4738 }
4739}
4740
4741void visit_type_QKeyCodeList(Visitor *m, QKeyCodeList ** obj, const char *name, Error **errp)
4742{
4743 GenericList *i, **prev = (GenericList **)obj;
4744 Error *err = NULL((void*)0);
4745
4746 if (!error_is_set(errp)) {
4747 visit_start_list(m, name, &err);
4748 if (!err) {
4749 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4750 QKeyCodeList *native_i = (QKeyCodeList *)i;
4751 visit_type_QKeyCode(m, &native_i->value, NULL((void*)0), &err);
4752 }
4753 error_propagate(errp, err);
4754 err = NULL((void*)0);
4755
4756 /* Always call end_list if start_list succeeded. */
4757 visit_end_list(m, &err);
4758 }
4759 error_propagate(errp, err);
4760 }
4761}
4762
4763void visit_type_QKeyCode(Visitor *m, QKeyCode * obj, const char *name, Error **errp)
4764{
4765 visit_type_enum(m, (int *)obj, QKeyCode_lookup, "QKeyCode", name, errp);
4766}
4767
4768void visit_type_KeyValueKind(Visitor *m, KeyValueKind * obj, const char *name, Error **errp)
4769{
4770 visit_type_enum(m, (int *)obj, KeyValueKind_lookup, "KeyValueKind", name, errp);
4771}
4772
4773void visit_type_KeyValue(Visitor *m, KeyValue ** obj, const char *name, Error **errp)
4774{
4775 Error *err = NULL((void*)0);
4776
4777 if (!error_is_set(errp)) {
4778 visit_start_struct(m, (void **)obj, "KeyValue", name, sizeof(KeyValue), &err);
4779 if (!err) {
4780 if (obj && *obj) {
4781 visit_type_KeyValueKind(m, &(*obj)->kind, "type", &err);
4782 if (!err) {
4783 switch ((*obj)->kind) {
4784 case KEY_VALUE_KIND_NUMBER:
4785 visit_type_int(m, &(*obj)->number, "data", &err);
4786 break;
4787 case KEY_VALUE_KIND_QCODE:
4788 visit_type_QKeyCode(m, &(*obj)->qcode, "data", &err);
4789 break;
4790 default:
4791 abort();
4792 }
4793 }
4794 error_propagate(errp, err);
4795 err = NULL((void*)0);
4796 }
4797 /* Always call end_struct if start_struct succeeded. */
4798 visit_end_struct(m, &err);
4799 }
4800 error_propagate(errp, err);
4801 }
4802}
4803
4804void visit_type_KeyValueList(Visitor *m, KeyValueList ** obj, const char *name, Error **errp)
4805{
4806 GenericList *i, **prev = (GenericList **)obj;
4807 Error *err = NULL((void*)0);
4808
4809 if (!error_is_set(errp)) {
4810 visit_start_list(m, name, &err);
4811 if (!err) {
4812 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4813 KeyValueList *native_i = (KeyValueList *)i;
4814 visit_type_KeyValue(m, &native_i->value, NULL((void*)0), &err);
4815 }
4816 error_propagate(errp, err);
4817 err = NULL((void*)0);
4818
4819 /* Always call end_list if start_list succeeded. */
4820 visit_end_list(m, &err);
4821 }
4822 error_propagate(errp, err);
4823 }
4824}
4825
4826static void visit_type_ChardevFile_fields(Visitor *m, ChardevFile ** obj, Error **errp)
4827{
4828 Error *err = NULL((void*)0);
4829 visit_start_optional(m, obj ? &(*obj)->has_in : NULL((void*)0), "in", &err);
4830 if (obj && (*obj)->has_in) {
4831 visit_type_str(m, obj ? &(*obj)->in : NULL((void*)0), "in", &err);
4832 }
4833 visit_end_optional(m, &err);
4834 visit_type_str(m, obj ? &(*obj)->out : NULL((void*)0), "out", &err);
4835
4836 error_propagate(errp, err);
4837}
4838
4839void visit_type_ChardevFile(Visitor *m, ChardevFile ** obj, const char *name, Error **errp)
4840{
4841 if (!error_is_set(errp)) {
4842 Error *err = NULL((void*)0);
4843 visit_start_struct(m, (void **)obj, "ChardevFile", name, sizeof(ChardevFile), &err);
4844 if (!err) {
4845 if (!obj || *obj) {
4846 visit_type_ChardevFile_fields(m, obj, &err);
4847 error_propagate(errp, err);
4848 err = NULL((void*)0);
4849 }
4850 /* Always call end_struct if start_struct succeeded. */
4851 visit_end_struct(m, &err);
4852 }
4853 error_propagate(errp, err);
4854 }
4855}
4856
4857void visit_type_ChardevFileList(Visitor *m, ChardevFileList ** obj, const char *name, Error **errp)
4858{
4859 GenericList *i, **prev = (GenericList **)obj;
4860 Error *err = NULL((void*)0);
4861
4862 if (!error_is_set(errp)) {
4863 visit_start_list(m, name, &err);
4864 if (!err) {
4865 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4866 ChardevFileList *native_i = (ChardevFileList *)i;
4867 visit_type_ChardevFile(m, &native_i->value, NULL((void*)0), &err);
4868 }
4869 error_propagate(errp, err);
4870 err = NULL((void*)0);
4871
4872 /* Always call end_list if start_list succeeded. */
4873 visit_end_list(m, &err);
4874 }
4875 error_propagate(errp, err);
4876 }
4877}
4878
4879static void visit_type_ChardevHostdev_fields(Visitor *m, ChardevHostdev ** obj, Error **errp)
4880{
4881 Error *err = NULL((void*)0);
4882 visit_type_str(m, obj ? &(*obj)->device : NULL((void*)0), "device", &err);
4883
4884 error_propagate(errp, err);
4885}
4886
4887void visit_type_ChardevHostdev(Visitor *m, ChardevHostdev ** obj, const char *name, Error **errp)
4888{
4889 if (!error_is_set(errp)) {
4890 Error *err = NULL((void*)0);
4891 visit_start_struct(m, (void **)obj, "ChardevHostdev", name, sizeof(ChardevHostdev), &err);
4892 if (!err) {
4893 if (!obj || *obj) {
4894 visit_type_ChardevHostdev_fields(m, obj, &err);
4895 error_propagate(errp, err);
4896 err = NULL((void*)0);
4897 }
4898 /* Always call end_struct if start_struct succeeded. */
4899 visit_end_struct(m, &err);
4900 }
4901 error_propagate(errp, err);
4902 }
4903}
4904
4905void visit_type_ChardevHostdevList(Visitor *m, ChardevHostdevList ** obj, const char *name, Error **errp)
4906{
4907 GenericList *i, **prev = (GenericList **)obj;
4908 Error *err = NULL((void*)0);
4909
4910 if (!error_is_set(errp)) {
4911 visit_start_list(m, name, &err);
4912 if (!err) {
4913 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4914 ChardevHostdevList *native_i = (ChardevHostdevList *)i;
4915 visit_type_ChardevHostdev(m, &native_i->value, NULL((void*)0), &err);
4916 }
4917 error_propagate(errp, err);
4918 err = NULL((void*)0);
4919
4920 /* Always call end_list if start_list succeeded. */
4921 visit_end_list(m, &err);
4922 }
4923 error_propagate(errp, err);
4924 }
4925}
4926
4927static void visit_type_ChardevSocket_fields(Visitor *m, ChardevSocket ** obj, Error **errp)
4928{
4929 Error *err = NULL((void*)0);
4930 visit_type_SocketAddress(m, obj ? &(*obj)->addr : NULL((void*)0), "addr", &err);
4931 visit_start_optional(m, obj ? &(*obj)->has_server : NULL((void*)0), "server", &err);
4932 if (obj && (*obj)->has_server) {
4933 visit_type_bool(m, obj ? &(*obj)->server : NULL((void*)0), "server", &err);
4934 }
4935 visit_end_optional(m, &err);
4936 visit_start_optional(m, obj ? &(*obj)->has_wait : NULL((void*)0), "wait", &err);
4937 if (obj && (*obj)->has_wait) {
4938 visit_type_bool(m, obj ? &(*obj)->wait : NULL((void*)0), "wait", &err);
4939 }
4940 visit_end_optional(m, &err);
4941 visit_start_optional(m, obj ? &(*obj)->has_nodelay : NULL((void*)0), "nodelay", &err);
4942 if (obj && (*obj)->has_nodelay) {
4943 visit_type_bool(m, obj ? &(*obj)->nodelay : NULL((void*)0), "nodelay", &err);
4944 }
4945 visit_end_optional(m, &err);
4946 visit_start_optional(m, obj ? &(*obj)->has_telnet : NULL((void*)0), "telnet", &err);
4947 if (obj && (*obj)->has_telnet) {
4948 visit_type_bool(m, obj ? &(*obj)->telnet : NULL((void*)0), "telnet", &err);
4949 }
4950 visit_end_optional(m, &err);
4951
4952 error_propagate(errp, err);
4953}
4954
4955void visit_type_ChardevSocket(Visitor *m, ChardevSocket ** obj, const char *name, Error **errp)
4956{
4957 if (!error_is_set(errp)) {
4958 Error *err = NULL((void*)0);
4959 visit_start_struct(m, (void **)obj, "ChardevSocket", name, sizeof(ChardevSocket), &err);
4960 if (!err) {
4961 if (!obj || *obj) {
4962 visit_type_ChardevSocket_fields(m, obj, &err);
4963 error_propagate(errp, err);
4964 err = NULL((void*)0);
4965 }
4966 /* Always call end_struct if start_struct succeeded. */
4967 visit_end_struct(m, &err);
4968 }
4969 error_propagate(errp, err);
4970 }
4971}
4972
4973void visit_type_ChardevSocketList(Visitor *m, ChardevSocketList ** obj, const char *name, Error **errp)
4974{
4975 GenericList *i, **prev = (GenericList **)obj;
4976 Error *err = NULL((void*)0);
4977
4978 if (!error_is_set(errp)) {
4979 visit_start_list(m, name, &err);
4980 if (!err) {
4981 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
4982 ChardevSocketList *native_i = (ChardevSocketList *)i;
4983 visit_type_ChardevSocket(m, &native_i->value, NULL((void*)0), &err);
4984 }
4985 error_propagate(errp, err);
4986 err = NULL((void*)0);
4987
4988 /* Always call end_list if start_list succeeded. */
4989 visit_end_list(m, &err);
4990 }
4991 error_propagate(errp, err);
4992 }
4993}
4994
4995static void visit_type_ChardevUdp_fields(Visitor *m, ChardevUdp ** obj, Error **errp)
4996{
4997 Error *err = NULL((void*)0);
4998 visit_type_SocketAddress(m, obj ? &(*obj)->remote : NULL((void*)0), "remote", &err);
4999 visit_start_optional(m, obj ? &(*obj)->has_local : NULL((void*)0), "local", &err);
5000 if (obj && (*obj)->has_local) {
5001 visit_type_SocketAddress(m, obj ? &(*obj)->local : NULL((void*)0), "local", &err);
5002 }
5003 visit_end_optional(m, &err);
5004
5005 error_propagate(errp, err);
5006}
5007
5008void visit_type_ChardevUdp(Visitor *m, ChardevUdp ** obj, const char *name, Error **errp)
5009{
5010 if (!error_is_set(errp)) {
5011 Error *err = NULL((void*)0);
5012 visit_start_struct(m, (void **)obj, "ChardevUdp", name, sizeof(ChardevUdp), &err);
5013 if (!err) {
5014 if (!obj || *obj) {
5015 visit_type_ChardevUdp_fields(m, obj, &err);
5016 error_propagate(errp, err);
5017 err = NULL((void*)0);
5018 }
5019 /* Always call end_struct if start_struct succeeded. */
5020 visit_end_struct(m, &err);
5021 }
5022 error_propagate(errp, err);
5023 }
5024}
5025
5026void visit_type_ChardevUdpList(Visitor *m, ChardevUdpList ** obj, const char *name, Error **errp)
5027{
5028 GenericList *i, **prev = (GenericList **)obj;
5029 Error *err = NULL((void*)0);
5030
5031 if (!error_is_set(errp)) {
5032 visit_start_list(m, name, &err);
5033 if (!err) {
5034 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5035 ChardevUdpList *native_i = (ChardevUdpList *)i;
5036 visit_type_ChardevUdp(m, &native_i->value, NULL((void*)0), &err);
5037 }
5038 error_propagate(errp, err);
5039 err = NULL((void*)0);
5040
5041 /* Always call end_list if start_list succeeded. */
5042 visit_end_list(m, &err);
5043 }
5044 error_propagate(errp, err);
5045 }
5046}
5047
5048static void visit_type_ChardevMux_fields(Visitor *m, ChardevMux ** obj, Error **errp)
5049{
5050 Error *err = NULL((void*)0);
5051 visit_type_str(m, obj ? &(*obj)->chardev : NULL((void*)0), "chardev", &err);
5052
5053 error_propagate(errp, err);
5054}
5055
5056void visit_type_ChardevMux(Visitor *m, ChardevMux ** obj, const char *name, Error **errp)
5057{
5058 if (!error_is_set(errp)) {
5059 Error *err = NULL((void*)0);
5060 visit_start_struct(m, (void **)obj, "ChardevMux", name, sizeof(ChardevMux), &err);
5061 if (!err) {
5062 if (!obj || *obj) {
5063 visit_type_ChardevMux_fields(m, obj, &err);
5064 error_propagate(errp, err);
5065 err = NULL((void*)0);
5066 }
5067 /* Always call end_struct if start_struct succeeded. */
5068 visit_end_struct(m, &err);
5069 }
5070 error_propagate(errp, err);
5071 }
5072}
5073
5074void visit_type_ChardevMuxList(Visitor *m, ChardevMuxList ** obj, const char *name, Error **errp)
5075{
5076 GenericList *i, **prev = (GenericList **)obj;
5077 Error *err = NULL((void*)0);
5078
5079 if (!error_is_set(errp)) {
5080 visit_start_list(m, name, &err);
5081 if (!err) {
5082 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5083 ChardevMuxList *native_i = (ChardevMuxList *)i;
5084 visit_type_ChardevMux(m, &native_i->value, NULL((void*)0), &err);
5085 }
5086 error_propagate(errp, err);
5087 err = NULL((void*)0);
5088
5089 /* Always call end_list if start_list succeeded. */
5090 visit_end_list(m, &err);
5091 }
5092 error_propagate(errp, err);
5093 }
5094}
5095
5096static void visit_type_ChardevStdio_fields(Visitor *m, ChardevStdio ** obj, Error **errp)
5097{
5098 Error *err = NULL((void*)0);
5099 visit_start_optional(m, obj ? &(*obj)->has_signal : NULL((void*)0), "signal", &err);
5100 if (obj && (*obj)->has_signal) {
5101 visit_type_bool(m, obj ? &(*obj)->signal : NULL((void*)0), "signal", &err);
5102 }
5103 visit_end_optional(m, &err);
5104
5105 error_propagate(errp, err);
5106}
5107
5108void visit_type_ChardevStdio(Visitor *m, ChardevStdio ** obj, const char *name, Error **errp)
5109{
5110 if (!error_is_set(errp)) {
5111 Error *err = NULL((void*)0);
5112 visit_start_struct(m, (void **)obj, "ChardevStdio", name, sizeof(ChardevStdio), &err);
5113 if (!err) {
5114 if (!obj || *obj) {
5115 visit_type_ChardevStdio_fields(m, obj, &err);
5116 error_propagate(errp, err);
5117 err = NULL((void*)0);
5118 }
5119 /* Always call end_struct if start_struct succeeded. */
5120 visit_end_struct(m, &err);
5121 }
5122 error_propagate(errp, err);
5123 }
5124}
5125
5126void visit_type_ChardevStdioList(Visitor *m, ChardevStdioList ** obj, const char *name, Error **errp)
5127{
5128 GenericList *i, **prev = (GenericList **)obj;
5129 Error *err = NULL((void*)0);
5130
5131 if (!error_is_set(errp)) {
5132 visit_start_list(m, name, &err);
5133 if (!err) {
5134 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5135 ChardevStdioList *native_i = (ChardevStdioList *)i;
5136 visit_type_ChardevStdio(m, &native_i->value, NULL((void*)0), &err);
5137 }
5138 error_propagate(errp, err);
5139 err = NULL((void*)0);
5140
5141 /* Always call end_list if start_list succeeded. */
5142 visit_end_list(m, &err);
5143 }
5144 error_propagate(errp, err);
5145 }
5146}
5147
5148static void visit_type_ChardevSpiceChannel_fields(Visitor *m, ChardevSpiceChannel ** obj, Error **errp)
5149{
5150 Error *err = NULL((void*)0);
5151 visit_type_str(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
5152
5153 error_propagate(errp, err);
5154}
5155
5156void visit_type_ChardevSpiceChannel(Visitor *m, ChardevSpiceChannel ** obj, const char *name, Error **errp)
5157{
5158 if (!error_is_set(errp)) {
5159 Error *err = NULL((void*)0);
5160 visit_start_struct(m, (void **)obj, "ChardevSpiceChannel", name, sizeof(ChardevSpiceChannel), &err);
5161 if (!err) {
5162 if (!obj || *obj) {
5163 visit_type_ChardevSpiceChannel_fields(m, obj, &err);
5164 error_propagate(errp, err);
5165 err = NULL((void*)0);
5166 }
5167 /* Always call end_struct if start_struct succeeded. */
5168 visit_end_struct(m, &err);
5169 }
5170 error_propagate(errp, err);
5171 }
5172}
5173
5174void visit_type_ChardevSpiceChannelList(Visitor *m, ChardevSpiceChannelList ** obj, const char *name, Error **errp)
5175{
5176 GenericList *i, **prev = (GenericList **)obj;
5177 Error *err = NULL((void*)0);
5178
5179 if (!error_is_set(errp)) {
5180 visit_start_list(m, name, &err);
5181 if (!err) {
5182 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5183 ChardevSpiceChannelList *native_i = (ChardevSpiceChannelList *)i;
5184 visit_type_ChardevSpiceChannel(m, &native_i->value, NULL((void*)0), &err);
5185 }
5186 error_propagate(errp, err);
5187 err = NULL((void*)0);
5188
5189 /* Always call end_list if start_list succeeded. */
5190 visit_end_list(m, &err);
5191 }
5192 error_propagate(errp, err);
5193 }
5194}
5195
5196static void visit_type_ChardevSpicePort_fields(Visitor *m, ChardevSpicePort ** obj, Error **errp)
5197{
5198 Error *err = NULL((void*)0);
5199 visit_type_str(m, obj ? &(*obj)->fqdn : NULL((void*)0), "fqdn", &err);
5200
5201 error_propagate(errp, err);
5202}
5203
5204void visit_type_ChardevSpicePort(Visitor *m, ChardevSpicePort ** obj, const char *name, Error **errp)
5205{
5206 if (!error_is_set(errp)) {
5207 Error *err = NULL((void*)0);
5208 visit_start_struct(m, (void **)obj, "ChardevSpicePort", name, sizeof(ChardevSpicePort), &err);
5209 if (!err) {
5210 if (!obj || *obj) {
5211 visit_type_ChardevSpicePort_fields(m, obj, &err);
5212 error_propagate(errp, err);
5213 err = NULL((void*)0);
5214 }
5215 /* Always call end_struct if start_struct succeeded. */
5216 visit_end_struct(m, &err);
5217 }
5218 error_propagate(errp, err);
5219 }
5220}
5221
5222void visit_type_ChardevSpicePortList(Visitor *m, ChardevSpicePortList ** obj, const char *name, Error **errp)
5223{
5224 GenericList *i, **prev = (GenericList **)obj;
5225 Error *err = NULL((void*)0);
5226
5227 if (!error_is_set(errp)) {
5228 visit_start_list(m, name, &err);
5229 if (!err) {
5230 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5231 ChardevSpicePortList *native_i = (ChardevSpicePortList *)i;
5232 visit_type_ChardevSpicePort(m, &native_i->value, NULL((void*)0), &err);
5233 }
5234 error_propagate(errp, err);
5235 err = NULL((void*)0);
5236
5237 /* Always call end_list if start_list succeeded. */
5238 visit_end_list(m, &err);
5239 }
5240 error_propagate(errp, err);
5241 }
5242}
5243
5244static void visit_type_ChardevVC_fields(Visitor *m, ChardevVC ** obj, Error **errp)
5245{
5246 Error *err = NULL((void*)0);
5247 visit_start_optional(m, obj ? &(*obj)->has_width : NULL((void*)0), "width", &err);
5248 if (obj && (*obj)->has_width) {
5249 visit_type_int(m, obj ? &(*obj)->width : NULL((void*)0), "width", &err);
5250 }
5251 visit_end_optional(m, &err);
5252 visit_start_optional(m, obj ? &(*obj)->has_height : NULL((void*)0), "height", &err);
5253 if (obj && (*obj)->has_height) {
5254 visit_type_int(m, obj ? &(*obj)->height : NULL((void*)0), "height", &err);
5255 }
5256 visit_end_optional(m, &err);
5257 visit_start_optional(m, obj ? &(*obj)->has_cols : NULL((void*)0), "cols", &err);
5258 if (obj && (*obj)->has_cols) {
5259 visit_type_int(m, obj ? &(*obj)->cols : NULL((void*)0), "cols", &err);
5260 }
5261 visit_end_optional(m, &err);
5262 visit_start_optional(m, obj ? &(*obj)->has_rows : NULL((void*)0), "rows", &err);
5263 if (obj && (*obj)->has_rows) {
5264 visit_type_int(m, obj ? &(*obj)->rows : NULL((void*)0), "rows", &err);
5265 }
5266 visit_end_optional(m, &err);
5267
5268 error_propagate(errp, err);
5269}
5270
5271void visit_type_ChardevVC(Visitor *m, ChardevVC ** obj, const char *name, Error **errp)
5272{
5273 if (!error_is_set(errp)) {
5274 Error *err = NULL((void*)0);
5275 visit_start_struct(m, (void **)obj, "ChardevVC", name, sizeof(ChardevVC), &err);
5276 if (!err) {
5277 if (!obj || *obj) {
5278 visit_type_ChardevVC_fields(m, obj, &err);
5279 error_propagate(errp, err);
5280 err = NULL((void*)0);
5281 }
5282 /* Always call end_struct if start_struct succeeded. */
5283 visit_end_struct(m, &err);
5284 }
5285 error_propagate(errp, err);
5286 }
5287}
5288
5289void visit_type_ChardevVCList(Visitor *m, ChardevVCList ** obj, const char *name, Error **errp)
5290{
5291 GenericList *i, **prev = (GenericList **)obj;
5292 Error *err = NULL((void*)0);
5293
5294 if (!error_is_set(errp)) {
5295 visit_start_list(m, name, &err);
5296 if (!err) {
5297 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5298 ChardevVCList *native_i = (ChardevVCList *)i;
5299 visit_type_ChardevVC(m, &native_i->value, NULL((void*)0), &err);
5300 }
5301 error_propagate(errp, err);
5302 err = NULL((void*)0);
5303
5304 /* Always call end_list if start_list succeeded. */
5305 visit_end_list(m, &err);
5306 }
5307 error_propagate(errp, err);
5308 }
5309}
5310
5311static void visit_type_ChardevRingbuf_fields(Visitor *m, ChardevRingbuf ** obj, Error **errp)
5312{
5313 Error *err = NULL((void*)0);
5314 visit_start_optional(m, obj ? &(*obj)->has_size : NULL((void*)0), "size", &err);
5315 if (obj && (*obj)->has_size) {
5316 visit_type_int(m, obj ? &(*obj)->size : NULL((void*)0), "size", &err);
5317 }
5318 visit_end_optional(m, &err);
5319
5320 error_propagate(errp, err);
5321}
5322
5323void visit_type_ChardevRingbuf(Visitor *m, ChardevRingbuf ** obj, const char *name, Error **errp)
5324{
5325 if (!error_is_set(errp)) {
5326 Error *err = NULL((void*)0);
5327 visit_start_struct(m, (void **)obj, "ChardevRingbuf", name, sizeof(ChardevRingbuf), &err);
5328 if (!err) {
5329 if (!obj || *obj) {
5330 visit_type_ChardevRingbuf_fields(m, obj, &err);
5331 error_propagate(errp, err);
5332 err = NULL((void*)0);
5333 }
5334 /* Always call end_struct if start_struct succeeded. */
5335 visit_end_struct(m, &err);
5336 }
5337 error_propagate(errp, err);
5338 }
5339}
5340
5341void visit_type_ChardevRingbufList(Visitor *m, ChardevRingbufList ** obj, const char *name, Error **errp)
5342{
5343 GenericList *i, **prev = (GenericList **)obj;
5344 Error *err = NULL((void*)0);
5345
5346 if (!error_is_set(errp)) {
5347 visit_start_list(m, name, &err);
5348 if (!err) {
5349 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5350 ChardevRingbufList *native_i = (ChardevRingbufList *)i;
5351 visit_type_ChardevRingbuf(m, &native_i->value, NULL((void*)0), &err);
5352 }
5353 error_propagate(errp, err);
5354 err = NULL((void*)0);
5355
5356 /* Always call end_list if start_list succeeded. */
5357 visit_end_list(m, &err);
5358 }
5359 error_propagate(errp, err);
5360 }
5361}
5362
5363static void visit_type_ChardevDummy_fields(Visitor *m, ChardevDummy ** obj, Error **errp)
5364{
5365 Error *err = NULL((void*)0);
5366
5367 error_propagate(errp, err);
5368}
5369
5370void visit_type_ChardevDummy(Visitor *m, ChardevDummy ** obj, const char *name, Error **errp)
5371{
5372 if (!error_is_set(errp)) {
5373 Error *err = NULL((void*)0);
5374 visit_start_struct(m, (void **)obj, "ChardevDummy", name, sizeof(ChardevDummy), &err);
5375 if (!err) {
5376 if (!obj || *obj) {
5377 visit_type_ChardevDummy_fields(m, obj, &err);
5378 error_propagate(errp, err);
5379 err = NULL((void*)0);
5380 }
5381 /* Always call end_struct if start_struct succeeded. */
5382 visit_end_struct(m, &err);
5383 }
5384 error_propagate(errp, err);
5385 }
5386}
5387
5388void visit_type_ChardevDummyList(Visitor *m, ChardevDummyList ** obj, const char *name, Error **errp)
5389{
5390 GenericList *i, **prev = (GenericList **)obj;
5391 Error *err = NULL((void*)0);
5392
5393 if (!error_is_set(errp)) {
5394 visit_start_list(m, name, &err);
5395 if (!err) {
5396 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5397 ChardevDummyList *native_i = (ChardevDummyList *)i;
5398 visit_type_ChardevDummy(m, &native_i->value, NULL((void*)0), &err);
5399 }
5400 error_propagate(errp, err);
5401 err = NULL((void*)0);
5402
5403 /* Always call end_list if start_list succeeded. */
5404 visit_end_list(m, &err);
5405 }
5406 error_propagate(errp, err);
5407 }
5408}
5409
5410void visit_type_ChardevBackendKind(Visitor *m, ChardevBackendKind * obj, const char *name, Error **errp)
5411{
5412 visit_type_enum(m, (int *)obj, ChardevBackendKind_lookup, "ChardevBackendKind", name, errp);
5413}
5414
5415void visit_type_ChardevBackend(Visitor *m, ChardevBackend ** obj, const char *name, Error **errp)
5416{
5417 Error *err = NULL((void*)0);
5418
5419 if (!error_is_set(errp)) {
5420 visit_start_struct(m, (void **)obj, "ChardevBackend", name, sizeof(ChardevBackend), &err);
5421 if (!err) {
5422 if (obj && *obj) {
5423 visit_type_ChardevBackendKind(m, &(*obj)->kind, "type", &err);
5424 if (!err) {
5425 switch ((*obj)->kind) {
5426 case CHARDEV_BACKEND_KIND_FILE:
5427 visit_type_ChardevFile(m, &(*obj)->file, "data", &err);
5428 break;
5429 case CHARDEV_BACKEND_KIND_SERIAL:
5430 visit_type_ChardevHostdev(m, &(*obj)->serial, "data", &err);
5431 break;
5432 case CHARDEV_BACKEND_KIND_PARALLEL:
5433 visit_type_ChardevHostdev(m, &(*obj)->parallel, "data", &err);
5434 break;
5435 case CHARDEV_BACKEND_KIND_PIPE:
5436 visit_type_ChardevHostdev(m, &(*obj)->pipe, "data", &err);
5437 break;
5438 case CHARDEV_BACKEND_KIND_SOCKET:
5439 visit_type_ChardevSocket(m, &(*obj)->socket, "data", &err);
5440 break;
5441 case CHARDEV_BACKEND_KIND_UDP:
5442 visit_type_ChardevUdp(m, &(*obj)->udp, "data", &err);
5443 break;
5444 case CHARDEV_BACKEND_KIND_PTY:
5445 visit_type_ChardevDummy(m, &(*obj)->pty, "data", &err);
5446 break;
5447 case CHARDEV_BACKEND_KIND_NULL:
5448 visit_type_ChardevDummy(m, &(*obj)->null, "data", &err);
5449 break;
5450 case CHARDEV_BACKEND_KIND_MUX:
5451 visit_type_ChardevMux(m, &(*obj)->mux, "data", &err);
5452 break;
5453 case CHARDEV_BACKEND_KIND_MSMOUSE:
5454 visit_type_ChardevDummy(m, &(*obj)->msmouse, "data", &err);
5455 break;
5456 case CHARDEV_BACKEND_KIND_BRAILLE:
5457 visit_type_ChardevDummy(m, &(*obj)->braille, "data", &err);
5458 break;
5459 case CHARDEV_BACKEND_KIND_STDIO:
5460 visit_type_ChardevStdio(m, &(*obj)->stdio, "data", &err);
5461 break;
5462 case CHARDEV_BACKEND_KIND_CONSOLE:
5463 visit_type_ChardevDummy(m, &(*obj)->console, "data", &err);
5464 break;
5465 case CHARDEV_BACKEND_KIND_SPICEVMC:
5466 visit_type_ChardevSpiceChannel(m, &(*obj)->spicevmc, "data", &err);
5467 break;
5468 case CHARDEV_BACKEND_KIND_SPICEPORT:
5469 visit_type_ChardevSpicePort(m, &(*obj)->spiceport, "data", &err);
5470 break;
5471 case CHARDEV_BACKEND_KIND_VC:
5472 visit_type_ChardevVC(m, &(*obj)->vc, "data", &err);
5473 break;
5474 case CHARDEV_BACKEND_KIND_RINGBUF:
5475 visit_type_ChardevRingbuf(m, &(*obj)->ringbuf, "data", &err);
5476 break;
5477 case CHARDEV_BACKEND_KIND_MEMORY:
5478 visit_type_ChardevRingbuf(m, &(*obj)->memory, "data", &err);
5479 break;
5480 default:
5481 abort();
5482 }
5483 }
5484 error_propagate(errp, err);
5485 err = NULL((void*)0);
5486 }
5487 /* Always call end_struct if start_struct succeeded. */
5488 visit_end_struct(m, &err);
5489 }
5490 error_propagate(errp, err);
5491 }
5492}
5493
5494void visit_type_ChardevBackendList(Visitor *m, ChardevBackendList ** obj, const char *name, Error **errp)
5495{
5496 GenericList *i, **prev = (GenericList **)obj;
5497 Error *err = NULL((void*)0);
5498
5499 if (!error_is_set(errp)) {
5500 visit_start_list(m, name, &err);
5501 if (!err) {
5502 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5503 ChardevBackendList *native_i = (ChardevBackendList *)i;
5504 visit_type_ChardevBackend(m, &native_i->value, NULL((void*)0), &err);
5505 }
5506 error_propagate(errp, err);
5507 err = NULL((void*)0);
5508
5509 /* Always call end_list if start_list succeeded. */
5510 visit_end_list(m, &err);
5511 }
5512 error_propagate(errp, err);
5513 }
5514}
5515
5516static void visit_type_ChardevReturn_fields(Visitor *m, ChardevReturn ** obj, Error **errp)
5517{
5518 Error *err = NULL((void*)0);
5519 visit_start_optional(m, obj ? &(*obj)->has_pty : NULL((void*)0), "pty", &err);
5520 if (obj && (*obj)->has_pty) {
5521 visit_type_str(m, obj ? &(*obj)->pty : NULL((void*)0), "pty", &err);
5522 }
5523 visit_end_optional(m, &err);
5524
5525 error_propagate(errp, err);
5526}
5527
5528void visit_type_ChardevReturn(Visitor *m, ChardevReturn ** obj, const char *name, Error **errp)
5529{
5530 if (!error_is_set(errp)) {
5531 Error *err = NULL((void*)0);
5532 visit_start_struct(m, (void **)obj, "ChardevReturn", name, sizeof(ChardevReturn), &err);
5533 if (!err) {
5534 if (!obj || *obj) {
5535 visit_type_ChardevReturn_fields(m, obj, &err);
5536 error_propagate(errp, err);
5537 err = NULL((void*)0);
5538 }
5539 /* Always call end_struct if start_struct succeeded. */
5540 visit_end_struct(m, &err);
5541 }
5542 error_propagate(errp, err);
5543 }
5544}
5545
5546void visit_type_ChardevReturnList(Visitor *m, ChardevReturnList ** obj, const char *name, Error **errp)
5547{
5548 GenericList *i, **prev = (GenericList **)obj;
5549 Error *err = NULL((void*)0);
5550
5551 if (!error_is_set(errp)) {
5552 visit_start_list(m, name, &err);
5553 if (!err) {
5554 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5555 ChardevReturnList *native_i = (ChardevReturnList *)i;
5556 visit_type_ChardevReturn(m, &native_i->value, NULL((void*)0), &err);
5557 }
5558 error_propagate(errp, err);
5559 err = NULL((void*)0);
5560
5561 /* Always call end_list if start_list succeeded. */
5562 visit_end_list(m, &err);
5563 }
5564 error_propagate(errp, err);
5565 }
5566}
5567
5568void visit_type_TpmModelList(Visitor *m, TpmModelList ** obj, const char *name, Error **errp)
5569{
5570 GenericList *i, **prev = (GenericList **)obj;
5571 Error *err = NULL((void*)0);
5572
5573 if (!error_is_set(errp)) {
5574 visit_start_list(m, name, &err);
5575 if (!err) {
5576 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5577 TpmModelList *native_i = (TpmModelList *)i;
5578 visit_type_TpmModel(m, &native_i->value, NULL((void*)0), &err);
5579 }
5580 error_propagate(errp, err);
5581 err = NULL((void*)0);
5582
5583 /* Always call end_list if start_list succeeded. */
5584 visit_end_list(m, &err);
5585 }
5586 error_propagate(errp, err);
5587 }
5588}
5589
5590void visit_type_TpmModel(Visitor *m, TpmModel * obj, const char *name, Error **errp)
5591{
5592 visit_type_enum(m, (int *)obj, TpmModel_lookup, "TpmModel", name, errp);
5593}
5594
5595void visit_type_TpmTypeList(Visitor *m, TpmTypeList ** obj, const char *name, Error **errp)
5596{
5597 GenericList *i, **prev = (GenericList **)obj;
5598 Error *err = NULL((void*)0);
5599
5600 if (!error_is_set(errp)) {
5601 visit_start_list(m, name, &err);
5602 if (!err) {
5603 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5604 TpmTypeList *native_i = (TpmTypeList *)i;
5605 visit_type_TpmType(m, &native_i->value, NULL((void*)0), &err);
5606 }
5607 error_propagate(errp, err);
5608 err = NULL((void*)0);
5609
5610 /* Always call end_list if start_list succeeded. */
5611 visit_end_list(m, &err);
5612 }
5613 error_propagate(errp, err);
5614 }
5615}
5616
5617void visit_type_TpmType(Visitor *m, TpmType * obj, const char *name, Error **errp)
5618{
5619 visit_type_enum(m, (int *)obj, TpmType_lookup, "TpmType", name, errp);
5620}
5621
5622static void visit_type_TPMPassthroughOptions_fields(Visitor *m, TPMPassthroughOptions ** obj, Error **errp)
5623{
5624 Error *err = NULL((void*)0);
5625 visit_start_optional(m, obj ? &(*obj)->has_path : NULL((void*)0), "path", &err);
5626 if (obj && (*obj)->has_path) {
5627 visit_type_str(m, obj ? &(*obj)->path : NULL((void*)0), "path", &err);
5628 }
5629 visit_end_optional(m, &err);
5630 visit_start_optional(m, obj ? &(*obj)->has_cancel_path : NULL((void*)0), "cancel-path", &err);
5631 if (obj && (*obj)->has_cancel_path) {
5632 visit_type_str(m, obj ? &(*obj)->cancel_path : NULL((void*)0), "cancel-path", &err);
5633 }
5634 visit_end_optional(m, &err);
5635
5636 error_propagate(errp, err);
5637}
5638
5639void visit_type_TPMPassthroughOptions(Visitor *m, TPMPassthroughOptions ** obj, const char *name, Error **errp)
5640{
5641 if (!error_is_set(errp)) {
5642 Error *err = NULL((void*)0);
5643 visit_start_struct(m, (void **)obj, "TPMPassthroughOptions", name, sizeof(TPMPassthroughOptions), &err);
5644 if (!err) {
5645 if (!obj || *obj) {
5646 visit_type_TPMPassthroughOptions_fields(m, obj, &err);
5647 error_propagate(errp, err);
5648 err = NULL((void*)0);
5649 }
5650 /* Always call end_struct if start_struct succeeded. */
5651 visit_end_struct(m, &err);
5652 }
5653 error_propagate(errp, err);
5654 }
5655}
5656
5657void visit_type_TPMPassthroughOptionsList(Visitor *m, TPMPassthroughOptionsList ** obj, const char *name, Error **errp)
5658{
5659 GenericList *i, **prev = (GenericList **)obj;
5660 Error *err = NULL((void*)0);
5661
5662 if (!error_is_set(errp)) {
5663 visit_start_list(m, name, &err);
5664 if (!err) {
5665 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5666 TPMPassthroughOptionsList *native_i = (TPMPassthroughOptionsList *)i;
5667 visit_type_TPMPassthroughOptions(m, &native_i->value, NULL((void*)0), &err);
5668 }
5669 error_propagate(errp, err);
5670 err = NULL((void*)0);
5671
5672 /* Always call end_list if start_list succeeded. */
5673 visit_end_list(m, &err);
5674 }
5675 error_propagate(errp, err);
5676 }
5677}
5678
5679void visit_type_TpmTypeOptionsKind(Visitor *m, TpmTypeOptionsKind * obj, const char *name, Error **errp)
5680{
5681 visit_type_enum(m, (int *)obj, TpmTypeOptionsKind_lookup, "TpmTypeOptionsKind", name, errp);
5682}
5683
5684void visit_type_TpmTypeOptions(Visitor *m, TpmTypeOptions ** obj, const char *name, Error **errp)
5685{
5686 Error *err = NULL((void*)0);
5687
5688 if (!error_is_set(errp)) {
5689 visit_start_struct(m, (void **)obj, "TpmTypeOptions", name, sizeof(TpmTypeOptions), &err);
5690 if (!err) {
5691 if (obj && *obj) {
5692 visit_type_TpmTypeOptionsKind(m, &(*obj)->kind, "type", &err);
5693 if (!err) {
5694 switch ((*obj)->kind) {
5695 case TPM_TYPE_OPTIONS_KIND_PASSTHROUGH:
5696 visit_type_TPMPassthroughOptions(m, &(*obj)->passthrough, "data", &err);
5697 break;
5698 default:
5699 abort();
5700 }
5701 }
5702 error_propagate(errp, err);
5703 err = NULL((void*)0);
5704 }
5705 /* Always call end_struct if start_struct succeeded. */
5706 visit_end_struct(m, &err);
5707 }
5708 error_propagate(errp, err);
5709 }
5710}
5711
5712void visit_type_TpmTypeOptionsList(Visitor *m, TpmTypeOptionsList ** obj, const char *name, Error **errp)
5713{
5714 GenericList *i, **prev = (GenericList **)obj;
5715 Error *err = NULL((void*)0);
5716
5717 if (!error_is_set(errp)) {
5718 visit_start_list(m, name, &err);
5719 if (!err) {
5720 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5721 TpmTypeOptionsList *native_i = (TpmTypeOptionsList *)i;
5722 visit_type_TpmTypeOptions(m, &native_i->value, NULL((void*)0), &err);
5723 }
5724 error_propagate(errp, err);
5725 err = NULL((void*)0);
5726
5727 /* Always call end_list if start_list succeeded. */
5728 visit_end_list(m, &err);
5729 }
5730 error_propagate(errp, err);
5731 }
5732}
5733
5734static void visit_type_TPMInfo_fields(Visitor *m, TPMInfo ** obj, Error **errp)
5735{
5736 Error *err = NULL((void*)0);
5737 visit_type_str(m, obj ? &(*obj)->id : NULL((void*)0), "id", &err);
5738 visit_type_TpmModel(m, obj ? &(*obj)->model : NULL((void*)0), "model", &err);
5739 visit_type_TpmTypeOptions(m, obj ? &(*obj)->options : NULL((void*)0), "options", &err);
5740
5741 error_propagate(errp, err);
5742}
5743
5744void visit_type_TPMInfo(Visitor *m, TPMInfo ** obj, const char *name, Error **errp)
5745{
5746 if (!error_is_set(errp)) {
5747 Error *err = NULL((void*)0);
5748 visit_start_struct(m, (void **)obj, "TPMInfo", name, sizeof(TPMInfo), &err);
5749 if (!err) {
5750 if (!obj || *obj) {
5751 visit_type_TPMInfo_fields(m, obj, &err);
5752 error_propagate(errp, err);
5753 err = NULL((void*)0);
5754 }
5755 /* Always call end_struct if start_struct succeeded. */
5756 visit_end_struct(m, &err);
5757 }
5758 error_propagate(errp, err);
5759 }
5760}
5761
5762void visit_type_TPMInfoList(Visitor *m, TPMInfoList ** obj, const char *name, Error **errp)
5763{
5764 GenericList *i, **prev = (GenericList **)obj;
5765 Error *err = NULL((void*)0);
5766
5767 if (!error_is_set(errp)) {
5768 visit_start_list(m, name, &err);
5769 if (!err) {
5770 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5771 TPMInfoList *native_i = (TPMInfoList *)i;
5772 visit_type_TPMInfo(m, &native_i->value, NULL((void*)0), &err);
5773 }
5774 error_propagate(errp, err);
5775 err = NULL((void*)0);
5776
5777 /* Always call end_list if start_list succeeded. */
5778 visit_end_list(m, &err);
5779 }
5780 error_propagate(errp, err);
5781 }
5782}
5783
5784static void visit_type_AcpiTableOptions_fields(Visitor *m, AcpiTableOptions ** obj, Error **errp)
5785{
5786 Error *err = NULL((void*)0);
5787 visit_start_optional(m, obj ? &(*obj)->has_sig : NULL((void*)0), "sig", &err);
5788 if (obj && (*obj)->has_sig) {
5789 visit_type_str(m, obj ? &(*obj)->sig : NULL((void*)0), "sig", &err);
5790 }
5791 visit_end_optional(m, &err);
5792 visit_start_optional(m, obj ? &(*obj)->has_rev : NULL((void*)0), "rev", &err);
5793 if (obj && (*obj)->has_rev) {
5794 visit_type_uint8(m, obj ? &(*obj)->rev : NULL((void*)0), "rev", &err);
5795 }
5796 visit_end_optional(m, &err);
5797 visit_start_optional(m, obj ? &(*obj)->has_oem_id : NULL((void*)0), "oem_id", &err);
5798 if (obj && (*obj)->has_oem_id) {
5799 visit_type_str(m, obj ? &(*obj)->oem_id : NULL((void*)0), "oem_id", &err);
5800 }
5801 visit_end_optional(m, &err);
5802 visit_start_optional(m, obj ? &(*obj)->has_oem_table_id : NULL((void*)0), "oem_table_id", &err);
5803 if (obj && (*obj)->has_oem_table_id) {
5804 visit_type_str(m, obj ? &(*obj)->oem_table_id : NULL((void*)0), "oem_table_id", &err);
5805 }
5806 visit_end_optional(m, &err);
5807 visit_start_optional(m, obj ? &(*obj)->has_oem_rev : NULL((void*)0), "oem_rev", &err);
5808 if (obj && (*obj)->has_oem_rev) {
5809 visit_type_uint32(m, obj ? &(*obj)->oem_rev : NULL((void*)0), "oem_rev", &err);
5810 }
5811 visit_end_optional(m, &err);
5812 visit_start_optional(m, obj ? &(*obj)->has_asl_compiler_id : NULL((void*)0), "asl_compiler_id", &err);
5813 if (obj && (*obj)->has_asl_compiler_id) {
5814 visit_type_str(m, obj ? &(*obj)->asl_compiler_id : NULL((void*)0), "asl_compiler_id", &err);
5815 }
5816 visit_end_optional(m, &err);
5817 visit_start_optional(m, obj ? &(*obj)->has_asl_compiler_rev : NULL((void*)0), "asl_compiler_rev", &err);
5818 if (obj && (*obj)->has_asl_compiler_rev) {
5819 visit_type_uint32(m, obj ? &(*obj)->asl_compiler_rev : NULL((void*)0), "asl_compiler_rev", &err);
5820 }
5821 visit_end_optional(m, &err);
5822 visit_start_optional(m, obj ? &(*obj)->has_file : NULL((void*)0), "file", &err);
5823 if (obj && (*obj)->has_file) {
5824 visit_type_str(m, obj ? &(*obj)->file : NULL((void*)0), "file", &err);
5825 }
5826 visit_end_optional(m, &err);
5827 visit_start_optional(m, obj ? &(*obj)->has_data : NULL((void*)0), "data", &err);
5828 if (obj && (*obj)->has_data) {
5829 visit_type_str(m, obj ? &(*obj)->data : NULL((void*)0), "data", &err);
5830 }
5831 visit_end_optional(m, &err);
5832
5833 error_propagate(errp, err);
5834}
5835
5836void visit_type_AcpiTableOptions(Visitor *m, AcpiTableOptions ** obj, const char *name, Error **errp)
5837{
5838 if (!error_is_set(errp)) {
5839 Error *err = NULL((void*)0);
5840 visit_start_struct(m, (void **)obj, "AcpiTableOptions", name, sizeof(AcpiTableOptions), &err);
5841 if (!err) {
5842 if (!obj || *obj) {
5843 visit_type_AcpiTableOptions_fields(m, obj, &err);
5844 error_propagate(errp, err);
5845 err = NULL((void*)0);
5846 }
5847 /* Always call end_struct if start_struct succeeded. */
5848 visit_end_struct(m, &err);
5849 }
5850 error_propagate(errp, err);
5851 }
5852}
5853
5854void visit_type_AcpiTableOptionsList(Visitor *m, AcpiTableOptionsList ** obj, const char *name, Error **errp)
5855{
5856 GenericList *i, **prev = (GenericList **)obj;
5857 Error *err = NULL((void*)0);
5858
5859 if (!error_is_set(errp)) {
5860 visit_start_list(m, name, &err);
5861 if (!err) {
5862 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5863 AcpiTableOptionsList *native_i = (AcpiTableOptionsList *)i;
5864 visit_type_AcpiTableOptions(m, &native_i->value, NULL((void*)0), &err);
5865 }
5866 error_propagate(errp, err);
5867 err = NULL((void*)0);
5868
5869 /* Always call end_list if start_list succeeded. */
5870 visit_end_list(m, &err);
5871 }
5872 error_propagate(errp, err);
5873 }
5874}
5875
5876void visit_type_CommandLineParameterTypeList(Visitor *m, CommandLineParameterTypeList ** obj, const char *name, Error **errp)
5877{
5878 GenericList *i, **prev = (GenericList **)obj;
5879 Error *err = NULL((void*)0);
5880
5881 if (!error_is_set(errp)) {
5882 visit_start_list(m, name, &err);
5883 if (!err) {
5884 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5885 CommandLineParameterTypeList *native_i = (CommandLineParameterTypeList *)i;
5886 visit_type_CommandLineParameterType(m, &native_i->value, NULL((void*)0), &err);
5887 }
5888 error_propagate(errp, err);
5889 err = NULL((void*)0);
5890
5891 /* Always call end_list if start_list succeeded. */
5892 visit_end_list(m, &err);
5893 }
5894 error_propagate(errp, err);
5895 }
5896}
5897
5898void visit_type_CommandLineParameterType(Visitor *m, CommandLineParameterType * obj, const char *name, Error **errp)
5899{
5900 visit_type_enum(m, (int *)obj, CommandLineParameterType_lookup, "CommandLineParameterType", name, errp);
5901}
5902
5903static void visit_type_CommandLineParameterInfo_fields(Visitor *m, CommandLineParameterInfo ** obj, Error **errp)
5904{
5905 Error *err = NULL((void*)0);
5906 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
5907 visit_type_CommandLineParameterType(m, obj ? &(*obj)->type : NULL((void*)0), "type", &err);
5908 visit_start_optional(m, obj ? &(*obj)->has_help : NULL((void*)0), "help", &err);
5909 if (obj && (*obj)->has_help) {
5910 visit_type_str(m, obj ? &(*obj)->help : NULL((void*)0), "help", &err);
5911 }
5912 visit_end_optional(m, &err);
5913
5914 error_propagate(errp, err);
5915}
5916
5917void visit_type_CommandLineParameterInfo(Visitor *m, CommandLineParameterInfo ** obj, const char *name, Error **errp)
5918{
5919 if (!error_is_set(errp)) {
5920 Error *err = NULL((void*)0);
5921 visit_start_struct(m, (void **)obj, "CommandLineParameterInfo", name, sizeof(CommandLineParameterInfo), &err);
5922 if (!err) {
5923 if (!obj || *obj) {
5924 visit_type_CommandLineParameterInfo_fields(m, obj, &err);
5925 error_propagate(errp, err);
5926 err = NULL((void*)0);
5927 }
5928 /* Always call end_struct if start_struct succeeded. */
5929 visit_end_struct(m, &err);
5930 }
5931 error_propagate(errp, err);
5932 }
5933}
5934
5935void visit_type_CommandLineParameterInfoList(Visitor *m, CommandLineParameterInfoList ** obj, const char *name, Error **errp)
5936{
5937 GenericList *i, **prev = (GenericList **)obj;
5938 Error *err = NULL((void*)0);
5939
5940 if (!error_is_set(errp)) {
5941 visit_start_list(m, name, &err);
5942 if (!err) {
5943 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5944 CommandLineParameterInfoList *native_i = (CommandLineParameterInfoList *)i;
5945 visit_type_CommandLineParameterInfo(m, &native_i->value, NULL((void*)0), &err);
5946 }
5947 error_propagate(errp, err);
5948 err = NULL((void*)0);
5949
5950 /* Always call end_list if start_list succeeded. */
5951 visit_end_list(m, &err);
5952 }
5953 error_propagate(errp, err);
5954 }
5955}
5956
5957static void visit_type_CommandLineOptionInfo_fields(Visitor *m, CommandLineOptionInfo ** obj, Error **errp)
5958{
5959 Error *err = NULL((void*)0);
5960 visit_type_str(m, obj ? &(*obj)->option : NULL((void*)0), "option", &err);
5961 visit_type_CommandLineParameterInfoList(m, obj ? &(*obj)->parameters : NULL((void*)0), "parameters", &err);
5962
5963 error_propagate(errp, err);
5964}
5965
5966void visit_type_CommandLineOptionInfo(Visitor *m, CommandLineOptionInfo ** obj, const char *name, Error **errp)
5967{
5968 if (!error_is_set(errp)) {
5969 Error *err = NULL((void*)0);
5970 visit_start_struct(m, (void **)obj, "CommandLineOptionInfo", name, sizeof(CommandLineOptionInfo), &err);
5971 if (!err) {
5972 if (!obj || *obj) {
5973 visit_type_CommandLineOptionInfo_fields(m, obj, &err);
5974 error_propagate(errp, err);
5975 err = NULL((void*)0);
5976 }
5977 /* Always call end_struct if start_struct succeeded. */
5978 visit_end_struct(m, &err);
5979 }
5980 error_propagate(errp, err);
5981 }
5982}
5983
5984void visit_type_CommandLineOptionInfoList(Visitor *m, CommandLineOptionInfoList ** obj, const char *name, Error **errp)
5985{
5986 GenericList *i, **prev = (GenericList **)obj;
5987 Error *err = NULL((void*)0);
5988
5989 if (!error_is_set(errp)) {
5990 visit_start_list(m, name, &err);
5991 if (!err) {
5992 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
5993 CommandLineOptionInfoList *native_i = (CommandLineOptionInfoList *)i;
5994 visit_type_CommandLineOptionInfo(m, &native_i->value, NULL((void*)0), &err);
5995 }
5996 error_propagate(errp, err);
5997 err = NULL((void*)0);
5998
5999 /* Always call end_list if start_list succeeded. */
6000 visit_end_list(m, &err);
6001 }
6002 error_propagate(errp, err);
6003 }
6004}
6005
6006void visit_type_X86CPURegister32List(Visitor *m, X86CPURegister32List ** obj, const char *name, Error **errp)
6007{
6008 GenericList *i, **prev = (GenericList **)obj;
6009 Error *err = NULL((void*)0);
6010
6011 if (!error_is_set(errp)) {
6012 visit_start_list(m, name, &err);
6013 if (!err) {
6014 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6015 X86CPURegister32List *native_i = (X86CPURegister32List *)i;
6016 visit_type_X86CPURegister32(m, &native_i->value, NULL((void*)0), &err);
6017 }
6018 error_propagate(errp, err);
6019 err = NULL((void*)0);
6020
6021 /* Always call end_list if start_list succeeded. */
6022 visit_end_list(m, &err);
6023 }
6024 error_propagate(errp, err);
6025 }
6026}
6027
6028void visit_type_X86CPURegister32(Visitor *m, X86CPURegister32 * obj, const char *name, Error **errp)
6029{
6030 visit_type_enum(m, (int *)obj, X86CPURegister32_lookup, "X86CPURegister32", name, errp);
6031}
6032
6033static void visit_type_X86CPUFeatureWordInfo_fields(Visitor *m, X86CPUFeatureWordInfo ** obj, Error **errp)
6034{
6035 Error *err = NULL((void*)0);
6036 visit_type_int(m, obj ? &(*obj)->cpuid_input_eax : NULL((void*)0), "cpuid-input-eax", &err);
6037 visit_start_optional(m, obj ? &(*obj)->has_cpuid_input_ecx : NULL((void*)0), "cpuid-input-ecx", &err);
6038 if (obj && (*obj)->has_cpuid_input_ecx) {
6039 visit_type_int(m, obj ? &(*obj)->cpuid_input_ecx : NULL((void*)0), "cpuid-input-ecx", &err);
6040 }
6041 visit_end_optional(m, &err);
6042 visit_type_X86CPURegister32(m, obj ? &(*obj)->cpuid_register : NULL((void*)0), "cpuid-register", &err);
6043 visit_type_int(m, obj ? &(*obj)->features : NULL((void*)0), "features", &err);
6044
6045 error_propagate(errp, err);
6046}
6047
6048void visit_type_X86CPUFeatureWordInfo(Visitor *m, X86CPUFeatureWordInfo ** obj, const char *name, Error **errp)
6049{
6050 if (!error_is_set(errp)) {
6051 Error *err = NULL((void*)0);
6052 visit_start_struct(m, (void **)obj, "X86CPUFeatureWordInfo", name, sizeof(X86CPUFeatureWordInfo), &err);
6053 if (!err) {
6054 if (!obj || *obj) {
6055 visit_type_X86CPUFeatureWordInfo_fields(m, obj, &err);
6056 error_propagate(errp, err);
6057 err = NULL((void*)0);
6058 }
6059 /* Always call end_struct if start_struct succeeded. */
6060 visit_end_struct(m, &err);
6061 }
6062 error_propagate(errp, err);
6063 }
6064}
6065
6066void visit_type_X86CPUFeatureWordInfoList(Visitor *m, X86CPUFeatureWordInfoList ** obj, const char *name, Error **errp)
6067{
6068 GenericList *i, **prev = (GenericList **)obj;
6069 Error *err = NULL((void*)0);
6070
6071 if (!error_is_set(errp)) {
6072 visit_start_list(m, name, &err);
6073 if (!err) {
6074 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6075 X86CPUFeatureWordInfoList *native_i = (X86CPUFeatureWordInfoList *)i;
6076 visit_type_X86CPUFeatureWordInfo(m, &native_i->value, NULL((void*)0), &err);
6077 }
6078 error_propagate(errp, err);
6079 err = NULL((void*)0);
6080
6081 /* Always call end_list if start_list succeeded. */
6082 visit_end_list(m, &err);
6083 }
6084 error_propagate(errp, err);
6085 }
6086}
6087
6088void visit_type_RxStateList(Visitor *m, RxStateList ** obj, const char *name, Error **errp)
6089{
6090 GenericList *i, **prev = (GenericList **)obj;
6091 Error *err = NULL((void*)0);
6092
6093 if (!error_is_set(errp)) {
6094 visit_start_list(m, name, &err);
6095 if (!err) {
6096 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6097 RxStateList *native_i = (RxStateList *)i;
6098 visit_type_RxState(m, &native_i->value, NULL((void*)0), &err);
6099 }
6100 error_propagate(errp, err);
6101 err = NULL((void*)0);
6102
6103 /* Always call end_list if start_list succeeded. */
6104 visit_end_list(m, &err);
6105 }
6106 error_propagate(errp, err);
6107 }
6108}
6109
6110void visit_type_RxState(Visitor *m, RxState * obj, const char *name, Error **errp)
6111{
6112 visit_type_enum(m, (int *)obj, RxState_lookup, "RxState", name, errp);
6113}
6114
6115static void visit_type_RxFilterInfo_fields(Visitor *m, RxFilterInfo ** obj, Error **errp)
6116{
6117 Error *err = NULL((void*)0);
6118 visit_type_str(m, obj ? &(*obj)->name : NULL((void*)0), "name", &err);
6119 visit_type_bool(m, obj ? &(*obj)->promiscuous : NULL((void*)0), "promiscuous", &err);
6120 visit_type_RxState(m, obj ? &(*obj)->multicast : NULL((void*)0), "multicast", &err);
6121 visit_type_RxState(m, obj ? &(*obj)->unicast : NULL((void*)0), "unicast", &err);
6122 visit_type_bool(m, obj ? &(*obj)->broadcast_allowed : NULL((void*)0), "broadcast-allowed", &err);
6123 visit_type_bool(m, obj ? &(*obj)->multicast_overflow : NULL((void*)0), "multicast-overflow", &err);
6124 visit_type_bool(m, obj ? &(*obj)->unicast_overflow : NULL((void*)0), "unicast-overflow", &err);
6125 visit_type_str(m, obj ? &(*obj)->main_mac : NULL((void*)0), "main-mac", &err);
6126 visit_type_intList(m, obj ? &(*obj)->vlan_table : NULL((void*)0), "vlan-table", &err);
6127 visit_type_strList(m, obj ? &(*obj)->unicast_table : NULL((void*)0), "unicast-table", &err);
6128 visit_type_strList(m, obj ? &(*obj)->multicast_table : NULL((void*)0), "multicast-table", &err);
6129
6130 error_propagate(errp, err);
6131}
6132
6133void visit_type_RxFilterInfo(Visitor *m, RxFilterInfo ** obj, const char *name, Error **errp)
6134{
6135 if (!error_is_set(errp)) {
6136 Error *err = NULL((void*)0);
6137 visit_start_struct(m, (void **)obj, "RxFilterInfo", name, sizeof(RxFilterInfo), &err);
6138 if (!err) {
6139 if (!obj || *obj) {
6140 visit_type_RxFilterInfo_fields(m, obj, &err);
6141 error_propagate(errp, err);
6142 err = NULL((void*)0);
6143 }
6144 /* Always call end_struct if start_struct succeeded. */
6145 visit_end_struct(m, &err);
6146 }
6147 error_propagate(errp, err);
6148 }
6149}
6150
6151void visit_type_RxFilterInfoList(Visitor *m, RxFilterInfoList ** obj, const char *name, Error **errp)
6152{
6153 GenericList *i, **prev = (GenericList **)obj;
6154 Error *err = NULL((void*)0);
6155
6156 if (!error_is_set(errp)) {
6157 visit_start_list(m, name, &err);
6158 if (!err) {
6159 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6160 RxFilterInfoList *native_i = (RxFilterInfoList *)i;
6161 visit_type_RxFilterInfo(m, &native_i->value, NULL((void*)0), &err);
6162 }
6163 error_propagate(errp, err);
6164 err = NULL((void*)0);
6165
6166 /* Always call end_list if start_list succeeded. */
6167 visit_end_list(m, &err);
6168 }
6169 error_propagate(errp, err);
6170 }
6171}
6172
6173void visit_type_BlockdevDiscardOptionsList(Visitor *m, BlockdevDiscardOptionsList ** obj, const char *name, Error **errp)
6174{
6175 GenericList *i, **prev = (GenericList **)obj;
6176 Error *err = NULL((void*)0);
6177
6178 if (!error_is_set(errp)) {
6179 visit_start_list(m, name, &err);
6180 if (!err) {
6181 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6182 BlockdevDiscardOptionsList *native_i = (BlockdevDiscardOptionsList *)i;
6183 visit_type_BlockdevDiscardOptions(m, &native_i->value, NULL((void*)0), &err);
6184 }
6185 error_propagate(errp, err);
6186 err = NULL((void*)0);
6187
6188 /* Always call end_list if start_list succeeded. */
6189 visit_end_list(m, &err);
6190 }
6191 error_propagate(errp, err);
6192 }
6193}
6194
6195void visit_type_BlockdevDiscardOptions(Visitor *m, BlockdevDiscardOptions * obj, const char *name, Error **errp)
6196{
6197 visit_type_enum(m, (int *)obj, BlockdevDiscardOptions_lookup, "BlockdevDiscardOptions", name, errp);
6198}
6199
6200void visit_type_BlockdevAioOptionsList(Visitor *m, BlockdevAioOptionsList ** obj, const char *name, Error **errp)
6201{
6202 GenericList *i, **prev = (GenericList **)obj;
6203 Error *err = NULL((void*)0);
6204
6205 if (!error_is_set(errp)) {
6206 visit_start_list(m, name, &err);
6207 if (!err) {
6208 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6209 BlockdevAioOptionsList *native_i = (BlockdevAioOptionsList *)i;
6210 visit_type_BlockdevAioOptions(m, &native_i->value, NULL((void*)0), &err);
6211 }
6212 error_propagate(errp, err);
6213 err = NULL((void*)0);
6214
6215 /* Always call end_list if start_list succeeded. */
6216 visit_end_list(m, &err);
6217 }
6218 error_propagate(errp, err);
6219 }
6220}
6221
6222void visit_type_BlockdevAioOptions(Visitor *m, BlockdevAioOptions * obj, const char *name, Error **errp)
6223{
6224 visit_type_enum(m, (int *)obj, BlockdevAioOptions_lookup, "BlockdevAioOptions", name, errp);
6225}
6226
6227static void visit_type_BlockdevCacheOptions_fields(Visitor *m, BlockdevCacheOptions ** obj, Error **errp)
6228{
6229 Error *err = NULL((void*)0);
6230 visit_start_optional(m, obj ? &(*obj)->has_writeback : NULL((void*)0), "writeback", &err);
6231 if (obj && (*obj)->has_writeback) {
6232 visit_type_bool(m, obj ? &(*obj)->writeback : NULL((void*)0), "writeback", &err);
6233 }
6234 visit_end_optional(m, &err);
6235 visit_start_optional(m, obj ? &(*obj)->has_direct : NULL((void*)0), "direct", &err);
6236 if (obj && (*obj)->has_direct) {
6237 visit_type_bool(m, obj ? &(*obj)->direct : NULL((void*)0), "direct", &err);
6238 }
6239 visit_end_optional(m, &err);
6240 visit_start_optional(m, obj ? &(*obj)->has_no_flush : NULL((void*)0), "no-flush", &err);
6241 if (obj && (*obj)->has_no_flush) {
6242 visit_type_bool(m, obj ? &(*obj)->no_flush : NULL((void*)0), "no-flush", &err);
6243 }
6244 visit_end_optional(m, &err);
6245
6246 error_propagate(errp, err);
6247}
6248
6249void visit_type_BlockdevCacheOptions(Visitor *m, BlockdevCacheOptions ** obj, const char *name, Error **errp)
6250{
6251 if (!error_is_set(errp)) {
6252 Error *err = NULL((void*)0);
6253 visit_start_struct(m, (void **)obj, "BlockdevCacheOptions", name, sizeof(BlockdevCacheOptions), &err);
6254 if (!err) {
6255 if (!obj || *obj) {
6256 visit_type_BlockdevCacheOptions_fields(m, obj, &err);
6257 error_propagate(errp, err);
6258 err = NULL((void*)0);
6259 }
6260 /* Always call end_struct if start_struct succeeded. */
6261 visit_end_struct(m, &err);
6262 }
6263 error_propagate(errp, err);
6264 }
6265}
6266
6267void visit_type_BlockdevCacheOptionsList(Visitor *m, BlockdevCacheOptionsList ** obj, const char *name, Error **errp)
6268{
6269 GenericList *i, **prev = (GenericList **)obj;
6270 Error *err = NULL((void*)0);
6271
6272 if (!error_is_set(errp)) {
6273 visit_start_list(m, name, &err);
6274 if (!err) {
6275 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6276 BlockdevCacheOptionsList *native_i = (BlockdevCacheOptionsList *)i;
6277 visit_type_BlockdevCacheOptions(m, &native_i->value, NULL((void*)0), &err);
6278 }
6279 error_propagate(errp, err);
6280 err = NULL((void*)0);
6281
6282 /* Always call end_list if start_list succeeded. */
6283 visit_end_list(m, &err);
6284 }
6285 error_propagate(errp, err);
6286 }
6287}
6288
6289static void visit_type_BlockdevOptionsBase_fields(Visitor *m, BlockdevOptionsBase ** obj, Error **errp)
6290{
6291 Error *err = NULL((void*)0);
6292 visit_type_str(m, obj ? &(*obj)->driver : NULL((void*)0), "driver", &err);
6293 visit_start_optional(m, obj ? &(*obj)->has_id : NULL((void*)0), "id", &err);
6294 if (obj && (*obj)->has_id) {
6295 visit_type_str(m, obj ? &(*obj)->id : NULL((void*)0), "id", &err);
6296 }
6297 visit_end_optional(m, &err);
6298 visit_start_optional(m, obj ? &(*obj)->has_discard : NULL((void*)0), "discard", &err);
6299 if (obj && (*obj)->has_discard) {
6300 visit_type_BlockdevDiscardOptions(m, obj ? &(*obj)->discard : NULL((void*)0), "discard", &err);
6301 }
6302 visit_end_optional(m, &err);
6303 visit_start_optional(m, obj ? &(*obj)->has_cache : NULL((void*)0), "cache", &err);
6304 if (obj && (*obj)->has_cache) {
6305 visit_type_BlockdevCacheOptions(m, obj ? &(*obj)->cache : NULL((void*)0), "cache", &err);
6306 }
6307 visit_end_optional(m, &err);
6308 visit_start_optional(m, obj ? &(*obj)->has_aio : NULL((void*)0), "aio", &err);
6309 if (obj && (*obj)->has_aio) {
6310 visit_type_BlockdevAioOptions(m, obj ? &(*obj)->aio : NULL((void*)0), "aio", &err);
6311 }
6312 visit_end_optional(m, &err);
6313 visit_start_optional(m, obj ? &(*obj)->has_rerror : NULL((void*)0), "rerror", &err);
6314 if (obj && (*obj)->has_rerror) {
6315 visit_type_BlockdevOnError(m, obj ? &(*obj)->rerror : NULL((void*)0), "rerror", &err);
6316 }
6317 visit_end_optional(m, &err);
6318 visit_start_optional(m, obj ? &(*obj)->has_werror : NULL((void*)0), "werror", &err);
6319 if (obj && (*obj)->has_werror) {
6320 visit_type_BlockdevOnError(m, obj ? &(*obj)->werror : NULL((void*)0), "werror", &err);
6321 }
6322 visit_end_optional(m, &err);
6323 visit_start_optional(m, obj ? &(*obj)->has_read_only : NULL((void*)0), "read-only", &err);
6324 if (obj && (*obj)->has_read_only) {
6325 visit_type_bool(m, obj ? &(*obj)->read_only : NULL((void*)0), "read-only", &err);
6326 }
6327 visit_end_optional(m, &err);
6328
6329 error_propagate(errp, err);
6330}
6331
6332void visit_type_BlockdevOptionsBase(Visitor *m, BlockdevOptionsBase ** obj, const char *name, Error **errp)
6333{
6334 if (!error_is_set(errp)) {
6335 Error *err = NULL((void*)0);
6336 visit_start_struct(m, (void **)obj, "BlockdevOptionsBase", name, sizeof(BlockdevOptionsBase), &err);
6337 if (!err) {
6338 if (!obj || *obj) {
6339 visit_type_BlockdevOptionsBase_fields(m, obj, &err);
6340 error_propagate(errp, err);
6341 err = NULL((void*)0);
6342 }
6343 /* Always call end_struct if start_struct succeeded. */
6344 visit_end_struct(m, &err);
6345 }
6346 error_propagate(errp, err);
6347 }
6348}
6349
6350void visit_type_BlockdevOptionsBaseList(Visitor *m, BlockdevOptionsBaseList ** obj, const char *name, Error **errp)
6351{
6352 GenericList *i, **prev = (GenericList **)obj;
6353 Error *err = NULL((void*)0);
6354
6355 if (!error_is_set(errp)) {
6356 visit_start_list(m, name, &err);
6357 if (!err) {
6358 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6359 BlockdevOptionsBaseList *native_i = (BlockdevOptionsBaseList *)i;
6360 visit_type_BlockdevOptionsBase(m, &native_i->value, NULL((void*)0), &err);
6361 }
6362 error_propagate(errp, err);
6363 err = NULL((void*)0);
6364
6365 /* Always call end_list if start_list succeeded. */
6366 visit_end_list(m, &err);
6367 }
6368 error_propagate(errp, err);
6369 }
6370}
6371
6372static void visit_type_BlockdevOptionsFile_fields(Visitor *m, BlockdevOptionsFile ** obj, Error **errp)
6373{
6374 Error *err = NULL((void*)0);
6375 visit_type_str(m, obj ? &(*obj)->filename : NULL((void*)0), "filename", &err);
6376
6377 error_propagate(errp, err);
6378}
6379
6380void visit_type_BlockdevOptionsFile(Visitor *m, BlockdevOptionsFile ** obj, const char *name, Error **errp)
6381{
6382 if (!error_is_set(errp)) {
6383 Error *err = NULL((void*)0);
6384 visit_start_struct(m, (void **)obj, "BlockdevOptionsFile", name, sizeof(BlockdevOptionsFile), &err);
6385 if (!err) {
6386 if (!obj || *obj) {
6387 visit_type_BlockdevOptionsFile_fields(m, obj, &err);
6388 error_propagate(errp, err);
6389 err = NULL((void*)0);
6390 }
6391 /* Always call end_struct if start_struct succeeded. */
6392 visit_end_struct(m, &err);
6393 }
6394 error_propagate(errp, err);
6395 }
6396}
6397
6398void visit_type_BlockdevOptionsFileList(Visitor *m, BlockdevOptionsFileList ** obj, const char *name, Error **errp)
6399{
6400 GenericList *i, **prev = (GenericList **)obj;
6401 Error *err = NULL((void*)0);
6402
6403 if (!error_is_set(errp)) {
6404 visit_start_list(m, name, &err);
6405 if (!err) {
6406 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6407 BlockdevOptionsFileList *native_i = (BlockdevOptionsFileList *)i;
6408 visit_type_BlockdevOptionsFile(m, &native_i->value, NULL((void*)0), &err);
6409 }
6410 error_propagate(errp, err);
6411 err = NULL((void*)0);
6412
6413 /* Always call end_list if start_list succeeded. */
6414 visit_end_list(m, &err);
6415 }
6416 error_propagate(errp, err);
6417 }
6418}
6419
6420static void visit_type_BlockdevOptionsVVFAT_fields(Visitor *m, BlockdevOptionsVVFAT ** obj, Error **errp)
6421{
6422 Error *err = NULL((void*)0);
6423 visit_type_str(m, obj ? &(*obj)->dir : NULL((void*)0), "dir", &err);
6424 visit_start_optional(m, obj ? &(*obj)->has_fat_type : NULL((void*)0), "fat-type", &err);
6425 if (obj && (*obj)->has_fat_type) {
6426 visit_type_int(m, obj ? &(*obj)->fat_type : NULL((void*)0), "fat-type", &err);
6427 }
6428 visit_end_optional(m, &err);
6429 visit_start_optional(m, obj ? &(*obj)->has_floppy : NULL((void*)0), "floppy", &err);
6430 if (obj && (*obj)->has_floppy) {
6431 visit_type_bool(m, obj ? &(*obj)->floppy : NULL((void*)0), "floppy", &err);
6432 }
6433 visit_end_optional(m, &err);
6434 visit_start_optional(m, obj ? &(*obj)->has_rw : NULL((void*)0), "rw", &err);
6435 if (obj && (*obj)->has_rw) {
6436 visit_type_bool(m, obj ? &(*obj)->rw : NULL((void*)0), "rw", &err);
6437 }
6438 visit_end_optional(m, &err);
6439
6440 error_propagate(errp, err);
6441}
6442
6443void visit_type_BlockdevOptionsVVFAT(Visitor *m, BlockdevOptionsVVFAT ** obj, const char *name, Error **errp)
6444{
6445 if (!error_is_set(errp)) {
6446 Error *err = NULL((void*)0);
6447 visit_start_struct(m, (void **)obj, "BlockdevOptionsVVFAT", name, sizeof(BlockdevOptionsVVFAT), &err);
6448 if (!err) {
6449 if (!obj || *obj) {
6450 visit_type_BlockdevOptionsVVFAT_fields(m, obj, &err);
6451 error_propagate(errp, err);
6452 err = NULL((void*)0);
6453 }
6454 /* Always call end_struct if start_struct succeeded. */
6455 visit_end_struct(m, &err);
6456 }
6457 error_propagate(errp, err);
6458 }
6459}
6460
6461void visit_type_BlockdevOptionsVVFATList(Visitor *m, BlockdevOptionsVVFATList ** obj, const char *name, Error **errp)
6462{
6463 GenericList *i, **prev = (GenericList **)obj;
6464 Error *err = NULL((void*)0);
6465
6466 if (!error_is_set(errp)) {
6467 visit_start_list(m, name, &err);
6468 if (!err) {
6469 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6470 BlockdevOptionsVVFATList *native_i = (BlockdevOptionsVVFATList *)i;
6471 visit_type_BlockdevOptionsVVFAT(m, &native_i->value, NULL((void*)0), &err);
6472 }
6473 error_propagate(errp, err);
6474 err = NULL((void*)0);
6475
6476 /* Always call end_list if start_list succeeded. */
6477 visit_end_list(m, &err);
6478 }
6479 error_propagate(errp, err);
6480 }
6481}
6482
6483static void visit_type_BlockdevOptionsGenericFormat_fields(Visitor *m, BlockdevOptionsGenericFormat ** obj, Error **errp)
6484{
6485 Error *err = NULL((void*)0);
6486 visit_type_BlockdevRef(m, obj ? &(*obj)->file : NULL((void*)0), "file", &err);
6487
6488 error_propagate(errp, err);
6489}
6490
6491void visit_type_BlockdevOptionsGenericFormat(Visitor *m, BlockdevOptionsGenericFormat ** obj, const char *name, Error **errp)
6492{
6493 if (!error_is_set(errp)) {
6494 Error *err = NULL((void*)0);
6495 visit_start_struct(m, (void **)obj, "BlockdevOptionsGenericFormat", name, sizeof(BlockdevOptionsGenericFormat), &err);
6496 if (!err) {
6497 if (!obj || *obj) {
6498 visit_type_BlockdevOptionsGenericFormat_fields(m, obj, &err);
6499 error_propagate(errp, err);
6500 err = NULL((void*)0);
6501 }
6502 /* Always call end_struct if start_struct succeeded. */
6503 visit_end_struct(m, &err);
6504 }
6505 error_propagate(errp, err);
6506 }
6507}
6508
6509void visit_type_BlockdevOptionsGenericFormatList(Visitor *m, BlockdevOptionsGenericFormatList ** obj, const char *name, Error **errp)
6510{
6511 GenericList *i, **prev = (GenericList **)obj;
6512 Error *err = NULL((void*)0);
6513
6514 if (!error_is_set(errp)) {
6515 visit_start_list(m, name, &err);
6516 if (!err) {
6517 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6518 BlockdevOptionsGenericFormatList *native_i = (BlockdevOptionsGenericFormatList *)i;
6519 visit_type_BlockdevOptionsGenericFormat(m, &native_i->value, NULL((void*)0), &err);
6520 }
6521 error_propagate(errp, err);
6522 err = NULL((void*)0);
6523
6524 /* Always call end_list if start_list succeeded. */
6525 visit_end_list(m, &err);
6526 }
6527 error_propagate(errp, err);
6528 }
6529}
6530
6531static void visit_type_BlockdevOptionsGenericCOWFormat_fields(Visitor *m, BlockdevOptionsGenericCOWFormat ** obj, Error **errp)
6532{
6533 Error *err = NULL((void*)0);
6534 visit_start_implicit_struct(m, obj ? (void**) &(*obj)->base : NULL((void*)0), sizeof(BlockdevOptionsGenericFormat), &err);
6535 if (!err) {
6536 visit_type_BlockdevOptionsGenericFormat_fields(m, obj ? &(*obj)->base : NULL((void*)0), &err);
6537 error_propagate(errp, err);
6538 err = NULL((void*)0);
6539 visit_end_implicit_struct(m, &err);
6540 }
6541 visit_start_optional(m, obj ? &(*obj)->has_backing : NULL((void*)0), "backing", &err);
6542 if (obj && (*obj)->has_backing) {
6543 visit_type_BlockdevRef(m, obj ? &(*obj)->backing : NULL((void*)0), "backing", &err);
6544 }
6545 visit_end_optional(m, &err);
6546
6547 error_propagate(errp, err);
6548}
6549
6550void visit_type_BlockdevOptionsGenericCOWFormat(Visitor *m, BlockdevOptionsGenericCOWFormat ** obj, const char *name, Error **errp)
6551{
6552 if (!error_is_set(errp)) {
6553 Error *err = NULL((void*)0);
6554 visit_start_struct(m, (void **)obj, "BlockdevOptionsGenericCOWFormat", name, sizeof(BlockdevOptionsGenericCOWFormat), &err);
6555 if (!err) {
6556 if (!obj || *obj) {
6557 visit_type_BlockdevOptionsGenericCOWFormat_fields(m, obj, &err);
6558 error_propagate(errp, err);
6559 err = NULL((void*)0);
6560 }
6561 /* Always call end_struct if start_struct succeeded. */
6562 visit_end_struct(m, &err);
6563 }
6564 error_propagate(errp, err);
6565 }
6566}
6567
6568void visit_type_BlockdevOptionsGenericCOWFormatList(Visitor *m, BlockdevOptionsGenericCOWFormatList ** obj, const char *name, Error **errp)
6569{
6570 GenericList *i, **prev = (GenericList **)obj;
6571 Error *err = NULL((void*)0);
6572
6573 if (!error_is_set(errp)) {
6574 visit_start_list(m, name, &err);
6575 if (!err) {
6576 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6577 BlockdevOptionsGenericCOWFormatList *native_i = (BlockdevOptionsGenericCOWFormatList *)i;
6578 visit_type_BlockdevOptionsGenericCOWFormat(m, &native_i->value, NULL((void*)0), &err);
6579 }
6580 error_propagate(errp, err);
6581 err = NULL((void*)0);
6582
6583 /* Always call end_list if start_list succeeded. */
6584 visit_end_list(m, &err);
6585 }
6586 error_propagate(errp, err);
6587 }
6588}
6589
6590static void visit_type_BlockdevOptionsQcow2_fields(Visitor *m, BlockdevOptionsQcow2 ** obj, Error **errp)
6591{
6592 Error *err = NULL((void*)0);
6593 visit_start_implicit_struct(m, obj ? (void**) &(*obj)->base : NULL((void*)0), sizeof(BlockdevOptionsGenericCOWFormat), &err);
6594 if (!err) {
6595 visit_type_BlockdevOptionsGenericCOWFormat_fields(m, obj ? &(*obj)->base : NULL((void*)0), &err);
6596 error_propagate(errp, err);
6597 err = NULL((void*)0);
6598 visit_end_implicit_struct(m, &err);
6599 }
6600 visit_start_optional(m, obj ? &(*obj)->has_lazy_refcounts : NULL((void*)0), "lazy-refcounts", &err);
6601 if (obj && (*obj)->has_lazy_refcounts) {
6602 visit_type_bool(m, obj ? &(*obj)->lazy_refcounts : NULL((void*)0), "lazy-refcounts", &err);
6603 }
6604 visit_end_optional(m, &err);
6605 visit_start_optional(m, obj ? &(*obj)->has_pass_discard_request : NULL((void*)0), "pass-discard-request", &err);
6606 if (obj && (*obj)->has_pass_discard_request) {
6607 visit_type_bool(m, obj ? &(*obj)->pass_discard_request : NULL((void*)0), "pass-discard-request", &err);
6608 }
6609 visit_end_optional(m, &err);
6610 visit_start_optional(m, obj ? &(*obj)->has_pass_discard_snapshot : NULL((void*)0), "pass-discard-snapshot", &err);
6611 if (obj && (*obj)->has_pass_discard_snapshot) {
6612 visit_type_bool(m, obj ? &(*obj)->pass_discard_snapshot : NULL((void*)0), "pass-discard-snapshot", &err);
6613 }
6614 visit_end_optional(m, &err);
6615 visit_start_optional(m, obj ? &(*obj)->has_pass_discard_other : NULL((void*)0), "pass-discard-other", &err);
6616 if (obj && (*obj)->has_pass_discard_other) {
6617 visit_type_bool(m, obj ? &(*obj)->pass_discard_other : NULL((void*)0), "pass-discard-other", &err);
6618 }
6619 visit_end_optional(m, &err);
6620
6621 error_propagate(errp, err);
6622}
6623
6624void visit_type_BlockdevOptionsQcow2(Visitor *m, BlockdevOptionsQcow2 ** obj, const char *name, Error **errp)
6625{
6626 if (!error_is_set(errp)) {
6627 Error *err = NULL((void*)0);
6628 visit_start_struct(m, (void **)obj, "BlockdevOptionsQcow2", name, sizeof(BlockdevOptionsQcow2), &err);
6629 if (!err) {
6630 if (!obj || *obj) {
6631 visit_type_BlockdevOptionsQcow2_fields(m, obj, &err);
6632 error_propagate(errp, err);
6633 err = NULL((void*)0);
6634 }
6635 /* Always call end_struct if start_struct succeeded. */
6636 visit_end_struct(m, &err);
6637 }
6638 error_propagate(errp, err);
6639 }
6640}
6641
6642void visit_type_BlockdevOptionsQcow2List(Visitor *m, BlockdevOptionsQcow2List ** obj, const char *name, Error **errp)
6643{
6644 GenericList *i, **prev = (GenericList **)obj;
6645 Error *err = NULL((void*)0);
6646
6647 if (!error_is_set(errp)) {
6648 visit_start_list(m, name, &err);
6649 if (!err) {
6650 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6651 BlockdevOptionsQcow2List *native_i = (BlockdevOptionsQcow2List *)i;
6652 visit_type_BlockdevOptionsQcow2(m, &native_i->value, NULL((void*)0), &err);
6653 }
6654 error_propagate(errp, err);
6655 err = NULL((void*)0);
6656
6657 /* Always call end_list if start_list succeeded. */
6658 visit_end_list(m, &err);
6659 }
6660 error_propagate(errp, err);
6661 }
6662}
6663
6664void visit_type_BlockdevOptionsKind(Visitor *m, BlockdevOptionsKind * obj, const char *name, Error **errp)
6665{
6666 visit_type_enum(m, (int *)obj, BlockdevOptionsKind_lookup, "BlockdevOptionsKind", name, errp);
6667}
6668
6669static void visit_type_BlockdevOptions_fields(Visitor *m, BlockdevOptions ** obj, Error **errp)
6670{
6671 Error *err = NULL((void*)0);
6672 visit_start_optional(m, obj ? &(*obj)->has_id : NULL((void*)0), "id", &err);
6673 if (obj && (*obj)->has_id) {
6674 visit_type_str(m, obj ? &(*obj)->id : NULL((void*)0), "id", &err);
6675 }
6676 visit_end_optional(m, &err);
6677 visit_start_optional(m, obj ? &(*obj)->has_discard : NULL((void*)0), "discard", &err);
6678 if (obj && (*obj)->has_discard) {
6679 visit_type_BlockdevDiscardOptions(m, obj ? &(*obj)->discard : NULL((void*)0), "discard", &err);
6680 }
6681 visit_end_optional(m, &err);
6682 visit_start_optional(m, obj ? &(*obj)->has_cache : NULL((void*)0), "cache", &err);
6683 if (obj && (*obj)->has_cache) {
6684 visit_type_BlockdevCacheOptions(m, obj ? &(*obj)->cache : NULL((void*)0), "cache", &err);
6685 }
6686 visit_end_optional(m, &err);
6687 visit_start_optional(m, obj ? &(*obj)->has_aio : NULL((void*)0), "aio", &err);
6688 if (obj && (*obj)->has_aio) {
6689 visit_type_BlockdevAioOptions(m, obj ? &(*obj)->aio : NULL((void*)0), "aio", &err);
6690 }
6691 visit_end_optional(m, &err);
6692 visit_start_optional(m, obj ? &(*obj)->has_rerror : NULL((void*)0), "rerror", &err);
6693 if (obj && (*obj)->has_rerror) {
6694 visit_type_BlockdevOnError(m, obj ? &(*obj)->rerror : NULL((void*)0), "rerror", &err);
6695 }
6696 visit_end_optional(m, &err);
6697 visit_start_optional(m, obj ? &(*obj)->has_werror : NULL((void*)0), "werror", &err);
6698 if (obj && (*obj)->has_werror) {
6699 visit_type_BlockdevOnError(m, obj ? &(*obj)->werror : NULL((void*)0), "werror", &err);
6700 }
6701 visit_end_optional(m, &err);
6702 visit_start_optional(m, obj ? &(*obj)->has_read_only : NULL((void*)0), "read-only", &err);
6703 if (obj && (*obj)->has_read_only) {
6704 visit_type_bool(m, obj ? &(*obj)->read_only : NULL((void*)0), "read-only", &err);
6705 }
6706 visit_end_optional(m, &err);
6707
6708 error_propagate(errp, err);
6709}
6710
6711void visit_type_BlockdevOptions(Visitor *m, BlockdevOptions ** obj, const char *name, Error **errp)
6712{
6713 Error *err = NULL((void*)0);
6714
6715 if (!error_is_set(errp)) {
6716 visit_start_struct(m, (void **)obj, "BlockdevOptions", name, sizeof(BlockdevOptions), &err);
6717 if (!err) {
6718 if (obj && *obj) {
6719 visit_type_BlockdevOptions_fields(m, obj, &err);
6720 visit_type_BlockdevOptionsKind(m, &(*obj)->kind, "driver", &err);
6721 if (!err) {
6722 switch ((*obj)->kind) {
6723 case BLOCKDEV_OPTIONS_KIND_FILE:
6724 visit_start_implicit_struct(m, (void**) &(*obj)->file, sizeof(BlockdevOptionsFile), &err);
6725 if (!err) {
6726 visit_type_BlockdevOptionsFile_fields(m, &(*obj)->file, &err);
6727 error_propagate(errp, err);
6728 err = NULL((void*)0);
6729 visit_end_implicit_struct(m, &err);
6730 }
6731 break;
6732 case BLOCKDEV_OPTIONS_KIND_HTTP:
6733 visit_start_implicit_struct(m, (void**) &(*obj)->http, sizeof(BlockdevOptionsFile), &err);
6734 if (!err) {
6735 visit_type_BlockdevOptionsFile_fields(m, &(*obj)->http, &err);
6736 error_propagate(errp, err);
6737 err = NULL((void*)0);
6738 visit_end_implicit_struct(m, &err);
6739 }
6740 break;
6741 case BLOCKDEV_OPTIONS_KIND_HTTPS:
6742 visit_start_implicit_struct(m, (void**) &(*obj)->https, sizeof(BlockdevOptionsFile), &err);
6743 if (!err) {
6744 visit_type_BlockdevOptionsFile_fields(m, &(*obj)->https, &err);
6745 error_propagate(errp, err);
6746 err = NULL((void*)0);
6747 visit_end_implicit_struct(m, &err);
6748 }
6749 break;
6750 case BLOCKDEV_OPTIONS_KIND_FTP:
6751 visit_start_implicit_struct(m, (void**) &(*obj)->ftp, sizeof(BlockdevOptionsFile), &err);
6752 if (!err) {
6753 visit_type_BlockdevOptionsFile_fields(m, &(*obj)->ftp, &err);
6754 error_propagate(errp, err);
6755 err = NULL((void*)0);
6756 visit_end_implicit_struct(m, &err);
6757 }
6758 break;
6759 case BLOCKDEV_OPTIONS_KIND_FTPS:
6760 visit_start_implicit_struct(m, (void**) &(*obj)->ftps, sizeof(BlockdevOptionsFile), &err);
6761 if (!err) {
6762 visit_type_BlockdevOptionsFile_fields(m, &(*obj)->ftps, &err);
6763 error_propagate(errp, err);
6764 err = NULL((void*)0);
6765 visit_end_implicit_struct(m, &err);
6766 }
6767 break;
6768 case BLOCKDEV_OPTIONS_KIND_TFTP:
6769 visit_start_implicit_struct(m, (void**) &(*obj)->tftp, sizeof(BlockdevOptionsFile), &err);
6770 if (!err) {
6771 visit_type_BlockdevOptionsFile_fields(m, &(*obj)->tftp, &err);
6772 error_propagate(errp, err);
6773 err = NULL((void*)0);
6774 visit_end_implicit_struct(m, &err);
6775 }
6776 break;
6777 case BLOCKDEV_OPTIONS_KIND_VVFAT:
6778 visit_start_implicit_struct(m, (void**) &(*obj)->vvfat, sizeof(BlockdevOptionsVVFAT), &err);
6779 if (!err) {
6780 visit_type_BlockdevOptionsVVFAT_fields(m, &(*obj)->vvfat, &err);
6781 error_propagate(errp, err);
6782 err = NULL((void*)0);
6783 visit_end_implicit_struct(m, &err);
6784 }
6785 break;
6786 case BLOCKDEV_OPTIONS_KIND_BOCHS:
6787 visit_start_implicit_struct(m, (void**) &(*obj)->bochs, sizeof(BlockdevOptionsGenericFormat), &err);
6788 if (!err) {
6789 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->bochs, &err);
6790 error_propagate(errp, err);
6791 err = NULL((void*)0);
6792 visit_end_implicit_struct(m, &err);
6793 }
6794 break;
6795 case BLOCKDEV_OPTIONS_KIND_CLOOP:
6796 visit_start_implicit_struct(m, (void**) &(*obj)->cloop, sizeof(BlockdevOptionsGenericFormat), &err);
6797 if (!err) {
6798 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->cloop, &err);
6799 error_propagate(errp, err);
6800 err = NULL((void*)0);
6801 visit_end_implicit_struct(m, &err);
6802 }
6803 break;
6804 case BLOCKDEV_OPTIONS_KIND_COW:
6805 visit_start_implicit_struct(m, (void**) &(*obj)->cow, sizeof(BlockdevOptionsGenericCOWFormat), &err);
6806 if (!err) {
6807 visit_type_BlockdevOptionsGenericCOWFormat_fields(m, &(*obj)->cow, &err);
6808 error_propagate(errp, err);
6809 err = NULL((void*)0);
6810 visit_end_implicit_struct(m, &err);
6811 }
6812 break;
6813 case BLOCKDEV_OPTIONS_KIND_DMG:
6814 visit_start_implicit_struct(m, (void**) &(*obj)->dmg, sizeof(BlockdevOptionsGenericFormat), &err);
6815 if (!err) {
6816 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->dmg, &err);
6817 error_propagate(errp, err);
6818 err = NULL((void*)0);
6819 visit_end_implicit_struct(m, &err);
6820 }
6821 break;
6822 case BLOCKDEV_OPTIONS_KIND_PARALLELS:
6823 visit_start_implicit_struct(m, (void**) &(*obj)->parallels, sizeof(BlockdevOptionsGenericFormat), &err);
6824 if (!err) {
6825 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->parallels, &err);
6826 error_propagate(errp, err);
6827 err = NULL((void*)0);
6828 visit_end_implicit_struct(m, &err);
6829 }
6830 break;
6831 case BLOCKDEV_OPTIONS_KIND_QCOW:
6832 visit_start_implicit_struct(m, (void**) &(*obj)->qcow, sizeof(BlockdevOptionsGenericCOWFormat), &err);
6833 if (!err) {
6834 visit_type_BlockdevOptionsGenericCOWFormat_fields(m, &(*obj)->qcow, &err);
6835 error_propagate(errp, err);
6836 err = NULL((void*)0);
6837 visit_end_implicit_struct(m, &err);
6838 }
6839 break;
6840 case BLOCKDEV_OPTIONS_KIND_QCOW2:
6841 visit_start_implicit_struct(m, (void**) &(*obj)->qcow2, sizeof(BlockdevOptionsQcow2), &err);
6842 if (!err) {
6843 visit_type_BlockdevOptionsQcow2_fields(m, &(*obj)->qcow2, &err);
6844 error_propagate(errp, err);
6845 err = NULL((void*)0);
6846 visit_end_implicit_struct(m, &err);
6847 }
6848 break;
6849 case BLOCKDEV_OPTIONS_KIND_QED:
6850 visit_start_implicit_struct(m, (void**) &(*obj)->qed, sizeof(BlockdevOptionsGenericCOWFormat), &err);
6851 if (!err) {
6852 visit_type_BlockdevOptionsGenericCOWFormat_fields(m, &(*obj)->qed, &err);
6853 error_propagate(errp, err);
6854 err = NULL((void*)0);
6855 visit_end_implicit_struct(m, &err);
6856 }
6857 break;
6858 case BLOCKDEV_OPTIONS_KIND_RAW:
6859 visit_start_implicit_struct(m, (void**) &(*obj)->raw, sizeof(BlockdevOptionsGenericFormat), &err);
6860 if (!err) {
6861 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->raw, &err);
6862 error_propagate(errp, err);
6863 err = NULL((void*)0);
6864 visit_end_implicit_struct(m, &err);
6865 }
6866 break;
6867 case BLOCKDEV_OPTIONS_KIND_VDI:
6868 visit_start_implicit_struct(m, (void**) &(*obj)->vdi, sizeof(BlockdevOptionsGenericFormat), &err);
6869 if (!err) {
6870 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->vdi, &err);
6871 error_propagate(errp, err);
6872 err = NULL((void*)0);
6873 visit_end_implicit_struct(m, &err);
6874 }
6875 break;
6876 case BLOCKDEV_OPTIONS_KIND_VHDX:
6877 visit_start_implicit_struct(m, (void**) &(*obj)->vhdx, sizeof(BlockdevOptionsGenericFormat), &err);
6878 if (!err) {
6879 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->vhdx, &err);
6880 error_propagate(errp, err);
6881 err = NULL((void*)0);
6882 visit_end_implicit_struct(m, &err);
6883 }
6884 break;
6885 case BLOCKDEV_OPTIONS_KIND_VMDK:
6886 visit_start_implicit_struct(m, (void**) &(*obj)->vmdk, sizeof(BlockdevOptionsGenericCOWFormat), &err);
6887 if (!err) {
6888 visit_type_BlockdevOptionsGenericCOWFormat_fields(m, &(*obj)->vmdk, &err);
6889 error_propagate(errp, err);
6890 err = NULL((void*)0);
6891 visit_end_implicit_struct(m, &err);
6892 }
6893 break;
6894 case BLOCKDEV_OPTIONS_KIND_VPC:
6895 visit_start_implicit_struct(m, (void**) &(*obj)->vpc, sizeof(BlockdevOptionsGenericFormat), &err);
6896 if (!err) {
6897 visit_type_BlockdevOptionsGenericFormat_fields(m, &(*obj)->vpc, &err);
6898 error_propagate(errp, err);
6899 err = NULL((void*)0);
6900 visit_end_implicit_struct(m, &err);
6901 }
6902 break;
6903 default:
6904 abort();
6905 }
6906 }
6907 error_propagate(errp, err);
6908 err = NULL((void*)0);
6909 }
6910 /* Always call end_struct if start_struct succeeded. */
6911 visit_end_struct(m, &err);
6912 }
6913 error_propagate(errp, err);
6914 }
6915}
6916
6917void visit_type_BlockdevOptionsList(Visitor *m, BlockdevOptionsList ** obj, const char *name, Error **errp)
6918{
6919 GenericList *i, **prev = (GenericList **)obj;
6920 Error *err = NULL((void*)0);
6921
6922 if (!error_is_set(errp)) {
6923 visit_start_list(m, name, &err);
6924 if (!err) {
6925 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6926 BlockdevOptionsList *native_i = (BlockdevOptionsList *)i;
6927 visit_type_BlockdevOptions(m, &native_i->value, NULL((void*)0), &err);
6928 }
6929 error_propagate(errp, err);
6930 err = NULL((void*)0);
6931
6932 /* Always call end_list if start_list succeeded. */
6933 visit_end_list(m, &err);
6934 }
6935 error_propagate(errp, err);
6936 }
6937}
6938
6939void visit_type_BlockdevRef(Visitor *m, BlockdevRef ** obj, const char *name, Error **errp)
6940{
6941 Error *err = NULL((void*)0);
6942
6943 if (!error_is_set(errp)) {
6944 visit_start_implicit_struct(m, (void**) obj, sizeof(BlockdevRef), &err);
6945 visit_get_next_type(m, (int*) &(*obj)->kind, BlockdevRef_qtypes, name, &err);
6946 switch ((*obj)->kind) {
6947 case BLOCKDEV_REF_KIND_DEFINITION:
6948 visit_type_BlockdevOptions(m, &(*obj)->definition, name, &err);
6949 break;
6950 case BLOCKDEV_REF_KIND_REFERENCE:
6951 visit_type_str(m, &(*obj)->reference, name, &err);
6952 break;
6953 default:
6954 abort();
6955 }
6956 error_propagate(errp, err);
6957 err = NULL((void*)0);
6958 visit_end_implicit_struct(m, &err);
6959 }
6960}
6961
6962void visit_type_BlockdevRefList(Visitor *m, BlockdevRefList ** obj, const char *name, Error **errp)
6963{
6964 GenericList *i, **prev = (GenericList **)obj;
6965 Error *err = NULL((void*)0);
6966
6967 if (!error_is_set(errp)) {
6968 visit_start_list(m, name, &err);
6969 if (!err) {
6970 for (; (i = visit_next_list(m, prev, &err)) != NULL((void*)0); prev = &i) {
6971 BlockdevRefList *native_i = (BlockdevRefList *)i;
6972 visit_type_BlockdevRef(m, &native_i->value, NULL((void*)0), &err);
6973 }
6974 error_propagate(errp, err);
6975 err = NULL((void*)0);
6976
6977 /* Always call end_list if start_list succeeded. */
6978 visit_end_list(m, &err);
6979 }
6980 error_propagate(errp, err);
6981 }
6982}