1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | #include "qapi-visit.h" |
17 | |
18 | void visit_type_NameInfo(Visitor *m, NameInfo ** obj, const char *name, Error **errp) |
19 | { |
20 | if (error_is_set(errp)) { |
21 | return; |
22 | } |
23 | visit_start_struct(m, (void **)obj, "NameInfo", name, sizeof(NameInfo), errp); |
24 | if (obj && !*obj) { |
25 | goto end; |
26 | } |
27 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_name : NULL((void*)0), "name", errp); |
28 | if ((*obj)->has_name) { |
29 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
30 | } |
31 | visit_end_optional(m, errp); |
32 | end: |
33 | visit_end_struct(m, errp); |
34 | } |
35 | |
36 | void visit_type_NameInfoList(Visitor *m, NameInfoList ** obj, const char *name, Error **errp) |
37 | { |
38 | GenericList *i, **prev = (GenericList **)obj; |
39 | |
40 | if (error_is_set(errp)) { |
41 | return; |
42 | } |
43 | visit_start_list(m, name, errp); |
44 | |
45 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
46 | NameInfoList *native_i = (NameInfoList *)i; |
47 | visit_type_NameInfo(m, &native_i->value, NULL((void*)0), errp); |
48 | } |
49 | |
50 | visit_end_list(m, errp); |
51 | } |
52 | |
53 | void visit_type_VersionInfo(Visitor *m, VersionInfo ** obj, const char *name, Error **errp) |
54 | { |
55 | if (error_is_set(errp)) { |
56 | return; |
57 | } |
58 | visit_start_struct(m, (void **)obj, "VersionInfo", name, sizeof(VersionInfo), errp); |
59 | if (obj && !*obj) { |
60 | goto end; |
61 | } |
62 | visit_start_struct(m, NULL((void*)0), "", "qemu", 0, errp); |
63 | visit_type_int(m, (obj && *obj) ? &(*obj)->qemu.major : NULL((void*)0), "major", errp); |
64 | visit_type_int(m, (obj && *obj) ? &(*obj)->qemu.minor : NULL((void*)0), "minor", errp); |
65 | visit_type_int(m, (obj && *obj) ? &(*obj)->qemu.micro : NULL((void*)0), "micro", errp); |
66 | visit_end_struct(m, errp); |
67 | visit_type_str(m, (obj && *obj) ? &(*obj)->package : NULL((void*)0), "package", errp); |
68 | end: |
69 | visit_end_struct(m, errp); |
70 | } |
71 | |
72 | void visit_type_VersionInfoList(Visitor *m, VersionInfoList ** obj, const char *name, Error **errp) |
73 | { |
74 | GenericList *i, **prev = (GenericList **)obj; |
75 | |
76 | if (error_is_set(errp)) { |
77 | return; |
78 | } |
79 | visit_start_list(m, name, errp); |
80 | |
81 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
82 | VersionInfoList *native_i = (VersionInfoList *)i; |
83 | visit_type_VersionInfo(m, &native_i->value, NULL((void*)0), errp); |
84 | } |
85 | |
86 | visit_end_list(m, errp); |
87 | } |
88 | |
89 | void visit_type_KvmInfo(Visitor *m, KvmInfo ** obj, const char *name, Error **errp) |
90 | { |
91 | if (error_is_set(errp)) { |
92 | return; |
93 | } |
94 | visit_start_struct(m, (void **)obj, "KvmInfo", name, sizeof(KvmInfo), errp); |
95 | if (obj && !*obj) { |
96 | goto end; |
97 | } |
98 | visit_type_bool(m, (obj && *obj) ? &(*obj)->enabled : NULL((void*)0), "enabled", errp); |
99 | visit_type_bool(m, (obj && *obj) ? &(*obj)->present : NULL((void*)0), "present", errp); |
100 | end: |
101 | visit_end_struct(m, errp); |
102 | } |
103 | |
104 | void visit_type_KvmInfoList(Visitor *m, KvmInfoList ** obj, const char *name, Error **errp) |
105 | { |
106 | GenericList *i, **prev = (GenericList **)obj; |
107 | |
108 | if (error_is_set(errp)) { |
109 | return; |
110 | } |
111 | visit_start_list(m, name, errp); |
112 | |
113 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
114 | KvmInfoList *native_i = (KvmInfoList *)i; |
115 | visit_type_KvmInfo(m, &native_i->value, NULL((void*)0), errp); |
116 | } |
117 | |
118 | visit_end_list(m, errp); |
119 | } |
120 | |
121 | void visit_type_RunState(Visitor *m, RunState * obj, const char *name, Error **errp) |
122 | { |
123 | visit_type_enum(m, (int *)obj, RunState_lookup, "RunState", name, errp); |
124 | } |
125 | |
126 | void visit_type_StatusInfo(Visitor *m, StatusInfo ** obj, const char *name, Error **errp) |
127 | { |
128 | if (error_is_set(errp)) { |
129 | return; |
130 | } |
131 | visit_start_struct(m, (void **)obj, "StatusInfo", name, sizeof(StatusInfo), errp); |
132 | if (obj && !*obj) { |
133 | goto end; |
134 | } |
135 | visit_type_bool(m, (obj && *obj) ? &(*obj)->running : NULL((void*)0), "running", errp); |
136 | visit_type_bool(m, (obj && *obj) ? &(*obj)->singlestep : NULL((void*)0), "singlestep", errp); |
137 | visit_type_RunState(m, (obj && *obj) ? &(*obj)->status : NULL((void*)0), "status", errp); |
138 | end: |
139 | visit_end_struct(m, errp); |
140 | } |
141 | |
142 | void visit_type_StatusInfoList(Visitor *m, StatusInfoList ** obj, const char *name, Error **errp) |
143 | { |
144 | GenericList *i, **prev = (GenericList **)obj; |
145 | |
146 | if (error_is_set(errp)) { |
147 | return; |
148 | } |
149 | visit_start_list(m, name, errp); |
150 | |
151 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
152 | StatusInfoList *native_i = (StatusInfoList *)i; |
153 | visit_type_StatusInfo(m, &native_i->value, NULL((void*)0), errp); |
154 | } |
155 | |
156 | visit_end_list(m, errp); |
157 | } |
158 | |
159 | void visit_type_UuidInfo(Visitor *m, UuidInfo ** obj, const char *name, Error **errp) |
160 | { |
161 | if (error_is_set(errp)) { |
162 | return; |
163 | } |
164 | visit_start_struct(m, (void **)obj, "UuidInfo", name, sizeof(UuidInfo), errp); |
165 | if (obj && !*obj) { |
166 | goto end; |
167 | } |
168 | visit_type_str(m, (obj && *obj) ? &(*obj)->UUID : NULL((void*)0), "UUID", errp); |
169 | end: |
170 | visit_end_struct(m, errp); |
171 | } |
172 | |
173 | void visit_type_UuidInfoList(Visitor *m, UuidInfoList ** obj, const char *name, Error **errp) |
174 | { |
175 | GenericList *i, **prev = (GenericList **)obj; |
176 | |
177 | if (error_is_set(errp)) { |
178 | return; |
179 | } |
180 | visit_start_list(m, name, errp); |
181 | |
182 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
183 | UuidInfoList *native_i = (UuidInfoList *)i; |
184 | visit_type_UuidInfo(m, &native_i->value, NULL((void*)0), errp); |
185 | } |
186 | |
187 | visit_end_list(m, errp); |
188 | } |
189 | |
190 | void visit_type_ChardevInfo(Visitor *m, ChardevInfo ** obj, const char *name, Error **errp) |
191 | { |
192 | if (error_is_set(errp)) { |
193 | return; |
194 | } |
195 | visit_start_struct(m, (void **)obj, "ChardevInfo", name, sizeof(ChardevInfo), errp); |
196 | if (obj && !*obj) { |
197 | goto end; |
198 | } |
199 | visit_type_str(m, (obj && *obj) ? &(*obj)->label : NULL((void*)0), "label", errp); |
200 | visit_type_str(m, (obj && *obj) ? &(*obj)->filename : NULL((void*)0), "filename", errp); |
201 | end: |
202 | visit_end_struct(m, errp); |
203 | } |
204 | |
205 | void visit_type_ChardevInfoList(Visitor *m, ChardevInfoList ** obj, const char *name, Error **errp) |
206 | { |
207 | GenericList *i, **prev = (GenericList **)obj; |
208 | |
209 | if (error_is_set(errp)) { |
210 | return; |
211 | } |
212 | visit_start_list(m, name, errp); |
213 | |
214 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
215 | ChardevInfoList *native_i = (ChardevInfoList *)i; |
216 | visit_type_ChardevInfo(m, &native_i->value, NULL((void*)0), errp); |
217 | } |
218 | |
219 | visit_end_list(m, errp); |
220 | } |
221 | |
222 | void visit_type_CommandInfo(Visitor *m, CommandInfo ** obj, const char *name, Error **errp) |
223 | { |
224 | if (error_is_set(errp)) { |
225 | return; |
226 | } |
227 | visit_start_struct(m, (void **)obj, "CommandInfo", name, sizeof(CommandInfo), errp); |
228 | if (obj && !*obj) { |
229 | goto end; |
230 | } |
231 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
232 | end: |
233 | visit_end_struct(m, errp); |
234 | } |
235 | |
236 | void visit_type_CommandInfoList(Visitor *m, CommandInfoList ** obj, const char *name, Error **errp) |
237 | { |
238 | GenericList *i, **prev = (GenericList **)obj; |
239 | |
240 | if (error_is_set(errp)) { |
241 | return; |
242 | } |
243 | visit_start_list(m, name, errp); |
244 | |
245 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
246 | CommandInfoList *native_i = (CommandInfoList *)i; |
247 | visit_type_CommandInfo(m, &native_i->value, NULL((void*)0), errp); |
248 | } |
249 | |
250 | visit_end_list(m, errp); |
251 | } |
252 | |
253 | void visit_type_EventInfo(Visitor *m, EventInfo ** obj, const char *name, Error **errp) |
254 | { |
255 | if (error_is_set(errp)) { |
256 | return; |
257 | } |
258 | visit_start_struct(m, (void **)obj, "EventInfo", name, sizeof(EventInfo), errp); |
259 | if (obj && !*obj) { |
260 | goto end; |
261 | } |
262 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
263 | end: |
264 | visit_end_struct(m, errp); |
265 | } |
266 | |
267 | void visit_type_EventInfoList(Visitor *m, EventInfoList ** obj, const char *name, Error **errp) |
268 | { |
269 | GenericList *i, **prev = (GenericList **)obj; |
270 | |
271 | if (error_is_set(errp)) { |
272 | return; |
273 | } |
274 | visit_start_list(m, name, errp); |
275 | |
276 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
277 | EventInfoList *native_i = (EventInfoList *)i; |
278 | visit_type_EventInfo(m, &native_i->value, NULL((void*)0), errp); |
279 | } |
280 | |
281 | visit_end_list(m, errp); |
282 | } |
283 | |
284 | void visit_type_MigrationStats(Visitor *m, MigrationStats ** obj, const char *name, Error **errp) |
285 | { |
286 | if (error_is_set(errp)) { |
287 | return; |
288 | } |
289 | visit_start_struct(m, (void **)obj, "MigrationStats", name, sizeof(MigrationStats), errp); |
290 | if (obj && !*obj) { |
291 | goto end; |
292 | } |
293 | visit_type_int(m, (obj && *obj) ? &(*obj)->transferred : NULL((void*)0), "transferred", errp); |
294 | visit_type_int(m, (obj && *obj) ? &(*obj)->remaining : NULL((void*)0), "remaining", errp); |
295 | visit_type_int(m, (obj && *obj) ? &(*obj)->total : NULL((void*)0), "total", errp); |
296 | end: |
297 | visit_end_struct(m, errp); |
298 | } |
299 | |
300 | void visit_type_MigrationStatsList(Visitor *m, MigrationStatsList ** obj, const char *name, Error **errp) |
301 | { |
302 | GenericList *i, **prev = (GenericList **)obj; |
303 | |
304 | if (error_is_set(errp)) { |
305 | return; |
306 | } |
307 | visit_start_list(m, name, errp); |
308 | |
309 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
310 | MigrationStatsList *native_i = (MigrationStatsList *)i; |
311 | visit_type_MigrationStats(m, &native_i->value, NULL((void*)0), errp); |
312 | } |
313 | |
314 | visit_end_list(m, errp); |
315 | } |
316 | |
317 | void visit_type_MigrationInfo(Visitor *m, MigrationInfo ** obj, const char *name, Error **errp) |
318 | { |
319 | if (error_is_set(errp)) { |
320 | return; |
321 | } |
322 | visit_start_struct(m, (void **)obj, "MigrationInfo", name, sizeof(MigrationInfo), errp); |
323 | if (obj && !*obj) { |
324 | goto end; |
325 | } |
326 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_status : NULL((void*)0), "status", errp); |
327 | if ((*obj)->has_status) { |
328 | visit_type_str(m, (obj && *obj) ? &(*obj)->status : NULL((void*)0), "status", errp); |
329 | } |
330 | visit_end_optional(m, errp); |
331 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_ram : NULL((void*)0), "ram", errp); |
332 | if ((*obj)->has_ram) { |
333 | visit_type_MigrationStats(m, (obj && *obj) ? &(*obj)->ram : NULL((void*)0), "ram", errp); |
334 | } |
335 | visit_end_optional(m, errp); |
336 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_disk : NULL((void*)0), "disk", errp); |
337 | if ((*obj)->has_disk) { |
338 | visit_type_MigrationStats(m, (obj && *obj) ? &(*obj)->disk : NULL((void*)0), "disk", errp); |
339 | } |
340 | visit_end_optional(m, errp); |
341 | end: |
342 | visit_end_struct(m, errp); |
343 | } |
344 | |
345 | void visit_type_MigrationInfoList(Visitor *m, MigrationInfoList ** obj, const char *name, Error **errp) |
346 | { |
347 | GenericList *i, **prev = (GenericList **)obj; |
348 | |
349 | if (error_is_set(errp)) { |
350 | return; |
351 | } |
352 | visit_start_list(m, name, errp); |
353 | |
354 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
355 | MigrationInfoList *native_i = (MigrationInfoList *)i; |
356 | visit_type_MigrationInfo(m, &native_i->value, NULL((void*)0), errp); |
357 | } |
358 | |
359 | visit_end_list(m, errp); |
360 | } |
361 | |
362 | void visit_type_MouseInfo(Visitor *m, MouseInfo ** obj, const char *name, Error **errp) |
363 | { |
364 | if (error_is_set(errp)) { |
365 | return; |
366 | } |
367 | visit_start_struct(m, (void **)obj, "MouseInfo", name, sizeof(MouseInfo), errp); |
368 | if (obj && !*obj) { |
369 | goto end; |
370 | } |
371 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
372 | visit_type_int(m, (obj && *obj) ? &(*obj)->index : NULL((void*)0), "index", errp); |
373 | visit_type_bool(m, (obj && *obj) ? &(*obj)->current : NULL((void*)0), "current", errp); |
374 | visit_type_bool(m, (obj && *obj) ? &(*obj)->absolute : NULL((void*)0), "absolute", errp); |
375 | end: |
376 | visit_end_struct(m, errp); |
377 | } |
378 | |
379 | void visit_type_MouseInfoList(Visitor *m, MouseInfoList ** obj, const char *name, Error **errp) |
380 | { |
381 | GenericList *i, **prev = (GenericList **)obj; |
382 | |
383 | if (error_is_set(errp)) { |
384 | return; |
385 | } |
386 | visit_start_list(m, name, errp); |
387 | |
388 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
389 | MouseInfoList *native_i = (MouseInfoList *)i; |
390 | visit_type_MouseInfo(m, &native_i->value, NULL((void*)0), errp); |
391 | } |
392 | |
393 | visit_end_list(m, errp); |
394 | } |
395 | |
396 | void visit_type_CpuInfo(Visitor *m, CpuInfo ** obj, const char *name, Error **errp) |
397 | { |
398 | if (error_is_set(errp)) { |
399 | return; |
400 | } |
401 | visit_start_struct(m, (void **)obj, "CpuInfo", name, sizeof(CpuInfo), errp); |
402 | if (obj && !*obj) { |
403 | goto end; |
404 | } |
405 | visit_type_int(m, (obj && *obj) ? &(*obj)->CPU : NULL((void*)0), "CPU", errp); |
406 | visit_type_bool(m, (obj && *obj) ? &(*obj)->current : NULL((void*)0), "current", errp); |
407 | visit_type_bool(m, (obj && *obj) ? &(*obj)->halted : NULL((void*)0), "halted", errp); |
408 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_pc : NULL((void*)0), "pc", errp); |
409 | if ((*obj)->has_pc) { |
410 | visit_type_int(m, (obj && *obj) ? &(*obj)->pc : NULL((void*)0), "pc", errp); |
411 | } |
412 | visit_end_optional(m, errp); |
413 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_nip : NULL((void*)0), "nip", errp); |
414 | if ((*obj)->has_nip) { |
415 | visit_type_int(m, (obj && *obj) ? &(*obj)->nip : NULL((void*)0), "nip", errp); |
416 | } |
417 | visit_end_optional(m, errp); |
418 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_npc : NULL((void*)0), "npc", errp); |
419 | if ((*obj)->has_npc) { |
420 | visit_type_int(m, (obj && *obj) ? &(*obj)->npc : NULL((void*)0), "npc", errp); |
421 | } |
422 | visit_end_optional(m, errp); |
423 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_PC : NULL((void*)0), "PC", errp); |
424 | if ((*obj)->has_PC) { |
425 | visit_type_int(m, (obj && *obj) ? &(*obj)->PC : NULL((void*)0), "PC", errp); |
426 | } |
427 | visit_end_optional(m, errp); |
428 | visit_type_int(m, (obj && *obj) ? &(*obj)->thread_id : NULL((void*)0), "thread_id", errp); |
429 | end: |
430 | visit_end_struct(m, errp); |
431 | } |
432 | |
433 | void visit_type_CpuInfoList(Visitor *m, CpuInfoList ** obj, const char *name, Error **errp) |
434 | { |
435 | GenericList *i, **prev = (GenericList **)obj; |
436 | |
437 | if (error_is_set(errp)) { |
438 | return; |
439 | } |
440 | visit_start_list(m, name, errp); |
441 | |
442 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
443 | CpuInfoList *native_i = (CpuInfoList *)i; |
444 | visit_type_CpuInfo(m, &native_i->value, NULL((void*)0), errp); |
445 | } |
446 | |
447 | visit_end_list(m, errp); |
448 | } |
449 | |
450 | void visit_type_BlockDeviceInfo(Visitor *m, BlockDeviceInfo ** obj, const char *name, Error **errp) |
451 | { |
452 | if (error_is_set(errp)) { |
| |
453 | return; |
454 | } |
455 | visit_start_struct(m, (void **)obj, "BlockDeviceInfo", name, sizeof(BlockDeviceInfo), errp); |
456 | if (obj && !*obj) { |
| 2 | Assuming pointer value is null |
|
| |
457 | goto end; |
458 | } |
459 | visit_type_str(m, (obj && *obj) ? &(*obj)->file : NULL((void*)0), "file", errp); |
| |
460 | visit_type_bool(m, (obj && *obj) ? &(*obj)->ro : NULL((void*)0), "ro", errp); |
| |
461 | visit_type_str(m, (obj && *obj) ? &(*obj)->drv : NULL((void*)0), "drv", errp); |
| |
462 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_backing_file : NULL((void*)0), "backing_file", errp); |
| |
463 | if ((*obj)->has_backing_file) { |
| 8 | Dereference of null pointer loaded from variable 'obj' |
|
464 | visit_type_str(m, (obj && *obj) ? &(*obj)->backing_file : NULL((void*)0), "backing_file", errp); |
465 | } |
466 | visit_end_optional(m, errp); |
467 | visit_type_bool(m, (obj && *obj) ? &(*obj)->encrypted : NULL((void*)0), "encrypted", errp); |
468 | visit_type_int(m, (obj && *obj) ? &(*obj)->bps : NULL((void*)0), "bps", errp); |
469 | visit_type_int(m, (obj && *obj) ? &(*obj)->bps_rd : NULL((void*)0), "bps_rd", errp); |
470 | visit_type_int(m, (obj && *obj) ? &(*obj)->bps_wr : NULL((void*)0), "bps_wr", errp); |
471 | visit_type_int(m, (obj && *obj) ? &(*obj)->iops : NULL((void*)0), "iops", errp); |
472 | visit_type_int(m, (obj && *obj) ? &(*obj)->iops_rd : NULL((void*)0), "iops_rd", errp); |
473 | visit_type_int(m, (obj && *obj) ? &(*obj)->iops_wr : NULL((void*)0), "iops_wr", errp); |
474 | end: |
475 | visit_end_struct(m, errp); |
476 | } |
477 | |
478 | void visit_type_BlockDeviceInfoList(Visitor *m, BlockDeviceInfoList ** obj, const char *name, Error **errp) |
479 | { |
480 | GenericList *i, **prev = (GenericList **)obj; |
481 | |
482 | if (error_is_set(errp)) { |
483 | return; |
484 | } |
485 | visit_start_list(m, name, errp); |
486 | |
487 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
488 | BlockDeviceInfoList *native_i = (BlockDeviceInfoList *)i; |
489 | visit_type_BlockDeviceInfo(m, &native_i->value, NULL((void*)0), errp); |
490 | } |
491 | |
492 | visit_end_list(m, errp); |
493 | } |
494 | |
495 | void visit_type_BlockDeviceIoStatus(Visitor *m, BlockDeviceIoStatus * obj, const char *name, Error **errp) |
496 | { |
497 | visit_type_enum(m, (int *)obj, BlockDeviceIoStatus_lookup, "BlockDeviceIoStatus", name, errp); |
498 | } |
499 | |
500 | void visit_type_BlockInfo(Visitor *m, BlockInfo ** obj, const char *name, Error **errp) |
501 | { |
502 | if (error_is_set(errp)) { |
503 | return; |
504 | } |
505 | visit_start_struct(m, (void **)obj, "BlockInfo", name, sizeof(BlockInfo), errp); |
506 | if (obj && !*obj) { |
507 | goto end; |
508 | } |
509 | visit_type_str(m, (obj && *obj) ? &(*obj)->device : NULL((void*)0), "device", errp); |
510 | visit_type_str(m, (obj && *obj) ? &(*obj)->type : NULL((void*)0), "type", errp); |
511 | visit_type_bool(m, (obj && *obj) ? &(*obj)->removable : NULL((void*)0), "removable", errp); |
512 | visit_type_bool(m, (obj && *obj) ? &(*obj)->locked : NULL((void*)0), "locked", errp); |
513 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_inserted : NULL((void*)0), "inserted", errp); |
514 | if ((*obj)->has_inserted) { |
515 | visit_type_BlockDeviceInfo(m, (obj && *obj) ? &(*obj)->inserted : NULL((void*)0), "inserted", errp); |
516 | } |
517 | visit_end_optional(m, errp); |
518 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_tray_open : NULL((void*)0), "tray_open", errp); |
519 | if ((*obj)->has_tray_open) { |
520 | visit_type_bool(m, (obj && *obj) ? &(*obj)->tray_open : NULL((void*)0), "tray_open", errp); |
521 | } |
522 | visit_end_optional(m, errp); |
523 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_io_status : NULL((void*)0), "io-status", errp); |
524 | if ((*obj)->has_io_status) { |
525 | visit_type_BlockDeviceIoStatus(m, (obj && *obj) ? &(*obj)->io_status : NULL((void*)0), "io-status", errp); |
526 | } |
527 | visit_end_optional(m, errp); |
528 | end: |
529 | visit_end_struct(m, errp); |
530 | } |
531 | |
532 | void visit_type_BlockInfoList(Visitor *m, BlockInfoList ** obj, const char *name, Error **errp) |
533 | { |
534 | GenericList *i, **prev = (GenericList **)obj; |
535 | |
536 | if (error_is_set(errp)) { |
537 | return; |
538 | } |
539 | visit_start_list(m, name, errp); |
540 | |
541 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
542 | BlockInfoList *native_i = (BlockInfoList *)i; |
543 | visit_type_BlockInfo(m, &native_i->value, NULL((void*)0), errp); |
544 | } |
545 | |
546 | visit_end_list(m, errp); |
547 | } |
548 | |
549 | void visit_type_BlockDeviceStats(Visitor *m, BlockDeviceStats ** obj, const char *name, Error **errp) |
550 | { |
551 | if (error_is_set(errp)) { |
552 | return; |
553 | } |
554 | visit_start_struct(m, (void **)obj, "BlockDeviceStats", name, sizeof(BlockDeviceStats), errp); |
555 | if (obj && !*obj) { |
556 | goto end; |
557 | } |
558 | visit_type_int(m, (obj && *obj) ? &(*obj)->rd_bytes : NULL((void*)0), "rd_bytes", errp); |
559 | visit_type_int(m, (obj && *obj) ? &(*obj)->wr_bytes : NULL((void*)0), "wr_bytes", errp); |
560 | visit_type_int(m, (obj && *obj) ? &(*obj)->rd_operations : NULL((void*)0), "rd_operations", errp); |
561 | visit_type_int(m, (obj && *obj) ? &(*obj)->wr_operations : NULL((void*)0), "wr_operations", errp); |
562 | visit_type_int(m, (obj && *obj) ? &(*obj)->flush_operations : NULL((void*)0), "flush_operations", errp); |
563 | visit_type_int(m, (obj && *obj) ? &(*obj)->flush_total_time_ns : NULL((void*)0), "flush_total_time_ns", errp); |
564 | visit_type_int(m, (obj && *obj) ? &(*obj)->wr_total_time_ns : NULL((void*)0), "wr_total_time_ns", errp); |
565 | visit_type_int(m, (obj && *obj) ? &(*obj)->rd_total_time_ns : NULL((void*)0), "rd_total_time_ns", errp); |
566 | visit_type_int(m, (obj && *obj) ? &(*obj)->wr_highest_offset : NULL((void*)0), "wr_highest_offset", errp); |
567 | end: |
568 | visit_end_struct(m, errp); |
569 | } |
570 | |
571 | void visit_type_BlockDeviceStatsList(Visitor *m, BlockDeviceStatsList ** obj, const char *name, Error **errp) |
572 | { |
573 | GenericList *i, **prev = (GenericList **)obj; |
574 | |
575 | if (error_is_set(errp)) { |
576 | return; |
577 | } |
578 | visit_start_list(m, name, errp); |
579 | |
580 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
581 | BlockDeviceStatsList *native_i = (BlockDeviceStatsList *)i; |
582 | visit_type_BlockDeviceStats(m, &native_i->value, NULL((void*)0), errp); |
583 | } |
584 | |
585 | visit_end_list(m, errp); |
586 | } |
587 | |
588 | void visit_type_BlockStats(Visitor *m, BlockStats ** obj, const char *name, Error **errp) |
589 | { |
590 | if (error_is_set(errp)) { |
591 | return; |
592 | } |
593 | visit_start_struct(m, (void **)obj, "BlockStats", name, sizeof(BlockStats), errp); |
594 | if (obj && !*obj) { |
595 | goto end; |
596 | } |
597 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_device : NULL((void*)0), "device", errp); |
598 | if ((*obj)->has_device) { |
599 | visit_type_str(m, (obj && *obj) ? &(*obj)->device : NULL((void*)0), "device", errp); |
600 | } |
601 | visit_end_optional(m, errp); |
602 | visit_type_BlockDeviceStats(m, (obj && *obj) ? &(*obj)->stats : NULL((void*)0), "stats", errp); |
603 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_parent : NULL((void*)0), "parent", errp); |
604 | if ((*obj)->has_parent) { |
605 | visit_type_BlockStats(m, (obj && *obj) ? &(*obj)->parent : NULL((void*)0), "parent", errp); |
606 | } |
607 | visit_end_optional(m, errp); |
608 | end: |
609 | visit_end_struct(m, errp); |
610 | } |
611 | |
612 | void visit_type_BlockStatsList(Visitor *m, BlockStatsList ** obj, const char *name, Error **errp) |
613 | { |
614 | GenericList *i, **prev = (GenericList **)obj; |
615 | |
616 | if (error_is_set(errp)) { |
617 | return; |
618 | } |
619 | visit_start_list(m, name, errp); |
620 | |
621 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
622 | BlockStatsList *native_i = (BlockStatsList *)i; |
623 | visit_type_BlockStats(m, &native_i->value, NULL((void*)0), errp); |
624 | } |
625 | |
626 | visit_end_list(m, errp); |
627 | } |
628 | |
629 | void visit_type_VncClientInfo(Visitor *m, VncClientInfo ** obj, const char *name, Error **errp) |
630 | { |
631 | if (error_is_set(errp)) { |
632 | return; |
633 | } |
634 | visit_start_struct(m, (void **)obj, "VncClientInfo", name, sizeof(VncClientInfo), errp); |
635 | if (obj && !*obj) { |
636 | goto end; |
637 | } |
638 | visit_type_str(m, (obj && *obj) ? &(*obj)->host : NULL((void*)0), "host", errp); |
639 | visit_type_str(m, (obj && *obj) ? &(*obj)->family : NULL((void*)0), "family", errp); |
640 | visit_type_str(m, (obj && *obj) ? &(*obj)->service : NULL((void*)0), "service", errp); |
641 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_x509_dname : NULL((void*)0), "x509_dname", errp); |
642 | if ((*obj)->has_x509_dname) { |
643 | visit_type_str(m, (obj && *obj) ? &(*obj)->x509_dname : NULL((void*)0), "x509_dname", errp); |
644 | } |
645 | visit_end_optional(m, errp); |
646 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_sasl_username : NULL((void*)0), "sasl_username", errp); |
647 | if ((*obj)->has_sasl_username) { |
648 | visit_type_str(m, (obj && *obj) ? &(*obj)->sasl_username : NULL((void*)0), "sasl_username", errp); |
649 | } |
650 | visit_end_optional(m, errp); |
651 | end: |
652 | visit_end_struct(m, errp); |
653 | } |
654 | |
655 | void visit_type_VncClientInfoList(Visitor *m, VncClientInfoList ** obj, const char *name, Error **errp) |
656 | { |
657 | GenericList *i, **prev = (GenericList **)obj; |
658 | |
659 | if (error_is_set(errp)) { |
660 | return; |
661 | } |
662 | visit_start_list(m, name, errp); |
663 | |
664 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
665 | VncClientInfoList *native_i = (VncClientInfoList *)i; |
666 | visit_type_VncClientInfo(m, &native_i->value, NULL((void*)0), errp); |
667 | } |
668 | |
669 | visit_end_list(m, errp); |
670 | } |
671 | |
672 | void visit_type_VncInfo(Visitor *m, VncInfo ** obj, const char *name, Error **errp) |
673 | { |
674 | if (error_is_set(errp)) { |
675 | return; |
676 | } |
677 | visit_start_struct(m, (void **)obj, "VncInfo", name, sizeof(VncInfo), errp); |
678 | if (obj && !*obj) { |
679 | goto end; |
680 | } |
681 | visit_type_bool(m, (obj && *obj) ? &(*obj)->enabled : NULL((void*)0), "enabled", errp); |
682 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_host : NULL((void*)0), "host", errp); |
683 | if ((*obj)->has_host) { |
684 | visit_type_str(m, (obj && *obj) ? &(*obj)->host : NULL((void*)0), "host", errp); |
685 | } |
686 | visit_end_optional(m, errp); |
687 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_family : NULL((void*)0), "family", errp); |
688 | if ((*obj)->has_family) { |
689 | visit_type_str(m, (obj && *obj) ? &(*obj)->family : NULL((void*)0), "family", errp); |
690 | } |
691 | visit_end_optional(m, errp); |
692 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_service : NULL((void*)0), "service", errp); |
693 | if ((*obj)->has_service) { |
694 | visit_type_str(m, (obj && *obj) ? &(*obj)->service : NULL((void*)0), "service", errp); |
695 | } |
696 | visit_end_optional(m, errp); |
697 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_auth : NULL((void*)0), "auth", errp); |
698 | if ((*obj)->has_auth) { |
699 | visit_type_str(m, (obj && *obj) ? &(*obj)->auth : NULL((void*)0), "auth", errp); |
700 | } |
701 | visit_end_optional(m, errp); |
702 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_clients : NULL((void*)0), "clients", errp); |
703 | if ((*obj)->has_clients) { |
704 | visit_type_VncClientInfoList(m, (obj && *obj) ? &(*obj)->clients : NULL((void*)0), "clients", errp); |
705 | } |
706 | visit_end_optional(m, errp); |
707 | end: |
708 | visit_end_struct(m, errp); |
709 | } |
710 | |
711 | void visit_type_VncInfoList(Visitor *m, VncInfoList ** obj, const char *name, Error **errp) |
712 | { |
713 | GenericList *i, **prev = (GenericList **)obj; |
714 | |
715 | if (error_is_set(errp)) { |
716 | return; |
717 | } |
718 | visit_start_list(m, name, errp); |
719 | |
720 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
721 | VncInfoList *native_i = (VncInfoList *)i; |
722 | visit_type_VncInfo(m, &native_i->value, NULL((void*)0), errp); |
723 | } |
724 | |
725 | visit_end_list(m, errp); |
726 | } |
727 | |
728 | void visit_type_SpiceChannel(Visitor *m, SpiceChannel ** obj, const char *name, Error **errp) |
729 | { |
730 | if (error_is_set(errp)) { |
731 | return; |
732 | } |
733 | visit_start_struct(m, (void **)obj, "SpiceChannel", name, sizeof(SpiceChannel), errp); |
734 | if (obj && !*obj) { |
735 | goto end; |
736 | } |
737 | visit_type_str(m, (obj && *obj) ? &(*obj)->host : NULL((void*)0), "host", errp); |
738 | visit_type_str(m, (obj && *obj) ? &(*obj)->family : NULL((void*)0), "family", errp); |
739 | visit_type_str(m, (obj && *obj) ? &(*obj)->port : NULL((void*)0), "port", errp); |
740 | visit_type_int(m, (obj && *obj) ? &(*obj)->connection_id : NULL((void*)0), "connection-id", errp); |
741 | visit_type_int(m, (obj && *obj) ? &(*obj)->channel_type : NULL((void*)0), "channel-type", errp); |
742 | visit_type_int(m, (obj && *obj) ? &(*obj)->channel_id : NULL((void*)0), "channel-id", errp); |
743 | visit_type_bool(m, (obj && *obj) ? &(*obj)->tls : NULL((void*)0), "tls", errp); |
744 | end: |
745 | visit_end_struct(m, errp); |
746 | } |
747 | |
748 | void visit_type_SpiceChannelList(Visitor *m, SpiceChannelList ** obj, const char *name, Error **errp) |
749 | { |
750 | GenericList *i, **prev = (GenericList **)obj; |
751 | |
752 | if (error_is_set(errp)) { |
753 | return; |
754 | } |
755 | visit_start_list(m, name, errp); |
756 | |
757 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
758 | SpiceChannelList *native_i = (SpiceChannelList *)i; |
759 | visit_type_SpiceChannel(m, &native_i->value, NULL((void*)0), errp); |
760 | } |
761 | |
762 | visit_end_list(m, errp); |
763 | } |
764 | |
765 | void visit_type_SpiceQueryMouseMode(Visitor *m, SpiceQueryMouseMode * obj, const char *name, Error **errp) |
766 | { |
767 | visit_type_enum(m, (int *)obj, SpiceQueryMouseMode_lookup, "SpiceQueryMouseMode", name, errp); |
768 | } |
769 | |
770 | void visit_type_SpiceInfo(Visitor *m, SpiceInfo ** obj, const char *name, Error **errp) |
771 | { |
772 | if (error_is_set(errp)) { |
773 | return; |
774 | } |
775 | visit_start_struct(m, (void **)obj, "SpiceInfo", name, sizeof(SpiceInfo), errp); |
776 | if (obj && !*obj) { |
777 | goto end; |
778 | } |
779 | visit_type_bool(m, (obj && *obj) ? &(*obj)->enabled : NULL((void*)0), "enabled", errp); |
780 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_host : NULL((void*)0), "host", errp); |
781 | if ((*obj)->has_host) { |
782 | visit_type_str(m, (obj && *obj) ? &(*obj)->host : NULL((void*)0), "host", errp); |
783 | } |
784 | visit_end_optional(m, errp); |
785 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_port : NULL((void*)0), "port", errp); |
786 | if ((*obj)->has_port) { |
787 | visit_type_int(m, (obj && *obj) ? &(*obj)->port : NULL((void*)0), "port", errp); |
788 | } |
789 | visit_end_optional(m, errp); |
790 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_tls_port : NULL((void*)0), "tls-port", errp); |
791 | if ((*obj)->has_tls_port) { |
792 | visit_type_int(m, (obj && *obj) ? &(*obj)->tls_port : NULL((void*)0), "tls-port", errp); |
793 | } |
794 | visit_end_optional(m, errp); |
795 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_auth : NULL((void*)0), "auth", errp); |
796 | if ((*obj)->has_auth) { |
797 | visit_type_str(m, (obj && *obj) ? &(*obj)->auth : NULL((void*)0), "auth", errp); |
798 | } |
799 | visit_end_optional(m, errp); |
800 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_compiled_version : NULL((void*)0), "compiled-version", errp); |
801 | if ((*obj)->has_compiled_version) { |
802 | visit_type_str(m, (obj && *obj) ? &(*obj)->compiled_version : NULL((void*)0), "compiled-version", errp); |
803 | } |
804 | visit_end_optional(m, errp); |
805 | visit_type_SpiceQueryMouseMode(m, (obj && *obj) ? &(*obj)->mouse_mode : NULL((void*)0), "mouse-mode", errp); |
806 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_channels : NULL((void*)0), "channels", errp); |
807 | if ((*obj)->has_channels) { |
808 | visit_type_SpiceChannelList(m, (obj && *obj) ? &(*obj)->channels : NULL((void*)0), "channels", errp); |
809 | } |
810 | visit_end_optional(m, errp); |
811 | end: |
812 | visit_end_struct(m, errp); |
813 | } |
814 | |
815 | void visit_type_SpiceInfoList(Visitor *m, SpiceInfoList ** obj, const char *name, Error **errp) |
816 | { |
817 | GenericList *i, **prev = (GenericList **)obj; |
818 | |
819 | if (error_is_set(errp)) { |
820 | return; |
821 | } |
822 | visit_start_list(m, name, errp); |
823 | |
824 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
825 | SpiceInfoList *native_i = (SpiceInfoList *)i; |
826 | visit_type_SpiceInfo(m, &native_i->value, NULL((void*)0), errp); |
827 | } |
828 | |
829 | visit_end_list(m, errp); |
830 | } |
831 | |
832 | void visit_type_BalloonInfo(Visitor *m, BalloonInfo ** obj, const char *name, Error **errp) |
833 | { |
834 | if (error_is_set(errp)) { |
835 | return; |
836 | } |
837 | visit_start_struct(m, (void **)obj, "BalloonInfo", name, sizeof(BalloonInfo), errp); |
838 | if (obj && !*obj) { |
839 | goto end; |
840 | } |
841 | visit_type_int(m, (obj && *obj) ? &(*obj)->actual : NULL((void*)0), "actual", errp); |
842 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_mem_swapped_in : NULL((void*)0), "mem_swapped_in", errp); |
843 | if ((*obj)->has_mem_swapped_in) { |
844 | visit_type_int(m, (obj && *obj) ? &(*obj)->mem_swapped_in : NULL((void*)0), "mem_swapped_in", errp); |
845 | } |
846 | visit_end_optional(m, errp); |
847 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_mem_swapped_out : NULL((void*)0), "mem_swapped_out", errp); |
848 | if ((*obj)->has_mem_swapped_out) { |
849 | visit_type_int(m, (obj && *obj) ? &(*obj)->mem_swapped_out : NULL((void*)0), "mem_swapped_out", errp); |
850 | } |
851 | visit_end_optional(m, errp); |
852 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_major_page_faults : NULL((void*)0), "major_page_faults", errp); |
853 | if ((*obj)->has_major_page_faults) { |
854 | visit_type_int(m, (obj && *obj) ? &(*obj)->major_page_faults : NULL((void*)0), "major_page_faults", errp); |
855 | } |
856 | visit_end_optional(m, errp); |
857 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_minor_page_faults : NULL((void*)0), "minor_page_faults", errp); |
858 | if ((*obj)->has_minor_page_faults) { |
859 | visit_type_int(m, (obj && *obj) ? &(*obj)->minor_page_faults : NULL((void*)0), "minor_page_faults", errp); |
860 | } |
861 | visit_end_optional(m, errp); |
862 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_free_mem : NULL((void*)0), "free_mem", errp); |
863 | if ((*obj)->has_free_mem) { |
864 | visit_type_int(m, (obj && *obj) ? &(*obj)->free_mem : NULL((void*)0), "free_mem", errp); |
865 | } |
866 | visit_end_optional(m, errp); |
867 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_total_mem : NULL((void*)0), "total_mem", errp); |
868 | if ((*obj)->has_total_mem) { |
869 | visit_type_int(m, (obj && *obj) ? &(*obj)->total_mem : NULL((void*)0), "total_mem", errp); |
870 | } |
871 | visit_end_optional(m, errp); |
872 | end: |
873 | visit_end_struct(m, errp); |
874 | } |
875 | |
876 | void visit_type_BalloonInfoList(Visitor *m, BalloonInfoList ** obj, const char *name, Error **errp) |
877 | { |
878 | GenericList *i, **prev = (GenericList **)obj; |
879 | |
880 | if (error_is_set(errp)) { |
881 | return; |
882 | } |
883 | visit_start_list(m, name, errp); |
884 | |
885 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
886 | BalloonInfoList *native_i = (BalloonInfoList *)i; |
887 | visit_type_BalloonInfo(m, &native_i->value, NULL((void*)0), errp); |
888 | } |
889 | |
890 | visit_end_list(m, errp); |
891 | } |
892 | |
893 | void visit_type_PciMemoryRange(Visitor *m, PciMemoryRange ** obj, const char *name, Error **errp) |
894 | { |
895 | if (error_is_set(errp)) { |
896 | return; |
897 | } |
898 | visit_start_struct(m, (void **)obj, "PciMemoryRange", name, sizeof(PciMemoryRange), errp); |
899 | if (obj && !*obj) { |
900 | goto end; |
901 | } |
902 | visit_type_int(m, (obj && *obj) ? &(*obj)->base : NULL((void*)0), "base", errp); |
903 | visit_type_int(m, (obj && *obj) ? &(*obj)->limit : NULL((void*)0), "limit", errp); |
904 | end: |
905 | visit_end_struct(m, errp); |
906 | } |
907 | |
908 | void visit_type_PciMemoryRangeList(Visitor *m, PciMemoryRangeList ** obj, const char *name, Error **errp) |
909 | { |
910 | GenericList *i, **prev = (GenericList **)obj; |
911 | |
912 | if (error_is_set(errp)) { |
913 | return; |
914 | } |
915 | visit_start_list(m, name, errp); |
916 | |
917 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
918 | PciMemoryRangeList *native_i = (PciMemoryRangeList *)i; |
919 | visit_type_PciMemoryRange(m, &native_i->value, NULL((void*)0), errp); |
920 | } |
921 | |
922 | visit_end_list(m, errp); |
923 | } |
924 | |
925 | void visit_type_PciMemoryRegion(Visitor *m, PciMemoryRegion ** obj, const char *name, Error **errp) |
926 | { |
927 | if (error_is_set(errp)) { |
928 | return; |
929 | } |
930 | visit_start_struct(m, (void **)obj, "PciMemoryRegion", name, sizeof(PciMemoryRegion), errp); |
931 | if (obj && !*obj) { |
932 | goto end; |
933 | } |
934 | visit_type_int(m, (obj && *obj) ? &(*obj)->bar : NULL((void*)0), "bar", errp); |
935 | visit_type_str(m, (obj && *obj) ? &(*obj)->type : NULL((void*)0), "type", errp); |
936 | visit_type_int(m, (obj && *obj) ? &(*obj)->address : NULL((void*)0), "address", errp); |
937 | visit_type_int(m, (obj && *obj) ? &(*obj)->size : NULL((void*)0), "size", errp); |
938 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_prefetch : NULL((void*)0), "prefetch", errp); |
939 | if ((*obj)->has_prefetch) { |
940 | visit_type_bool(m, (obj && *obj) ? &(*obj)->prefetch : NULL((void*)0), "prefetch", errp); |
941 | } |
942 | visit_end_optional(m, errp); |
943 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_mem_type_64 : NULL((void*)0), "mem_type_64", errp); |
944 | if ((*obj)->has_mem_type_64) { |
945 | visit_type_bool(m, (obj && *obj) ? &(*obj)->mem_type_64 : NULL((void*)0), "mem_type_64", errp); |
946 | } |
947 | visit_end_optional(m, errp); |
948 | end: |
949 | visit_end_struct(m, errp); |
950 | } |
951 | |
952 | void visit_type_PciMemoryRegionList(Visitor *m, PciMemoryRegionList ** obj, const char *name, Error **errp) |
953 | { |
954 | GenericList *i, **prev = (GenericList **)obj; |
955 | |
956 | if (error_is_set(errp)) { |
957 | return; |
958 | } |
959 | visit_start_list(m, name, errp); |
960 | |
961 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
962 | PciMemoryRegionList *native_i = (PciMemoryRegionList *)i; |
963 | visit_type_PciMemoryRegion(m, &native_i->value, NULL((void*)0), errp); |
964 | } |
965 | |
966 | visit_end_list(m, errp); |
967 | } |
968 | |
969 | void visit_type_PciBridgeInfo(Visitor *m, PciBridgeInfo ** obj, const char *name, Error **errp) |
970 | { |
971 | if (error_is_set(errp)) { |
972 | return; |
973 | } |
974 | visit_start_struct(m, (void **)obj, "PciBridgeInfo", name, sizeof(PciBridgeInfo), errp); |
975 | if (obj && !*obj) { |
976 | goto end; |
977 | } |
978 | visit_start_struct(m, NULL((void*)0), "", "bus", 0, errp); |
979 | visit_type_int(m, (obj && *obj) ? &(*obj)->bus.number : NULL((void*)0), "number", errp); |
980 | visit_type_int(m, (obj && *obj) ? &(*obj)->bus.secondary : NULL((void*)0), "secondary", errp); |
981 | visit_type_int(m, (obj && *obj) ? &(*obj)->bus.subordinate : NULL((void*)0), "subordinate", errp); |
982 | visit_type_PciMemoryRange(m, (obj && *obj) ? &(*obj)->bus.io_range : NULL((void*)0), "io_range", errp); |
983 | visit_type_PciMemoryRange(m, (obj && *obj) ? &(*obj)->bus.memory_range : NULL((void*)0), "memory_range", errp); |
984 | visit_type_PciMemoryRange(m, (obj && *obj) ? &(*obj)->bus.prefetchable_range : NULL((void*)0), "prefetchable_range", errp); |
985 | visit_end_struct(m, errp); |
986 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_devices : NULL((void*)0), "devices", errp); |
987 | if ((*obj)->has_devices) { |
988 | visit_type_PciDeviceInfoList(m, (obj && *obj) ? &(*obj)->devices : NULL((void*)0), "devices", errp); |
989 | } |
990 | visit_end_optional(m, errp); |
991 | end: |
992 | visit_end_struct(m, errp); |
993 | } |
994 | |
995 | void visit_type_PciBridgeInfoList(Visitor *m, PciBridgeInfoList ** obj, const char *name, Error **errp) |
996 | { |
997 | GenericList *i, **prev = (GenericList **)obj; |
998 | |
999 | if (error_is_set(errp)) { |
1000 | return; |
1001 | } |
1002 | visit_start_list(m, name, errp); |
1003 | |
1004 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1005 | PciBridgeInfoList *native_i = (PciBridgeInfoList *)i; |
1006 | visit_type_PciBridgeInfo(m, &native_i->value, NULL((void*)0), errp); |
1007 | } |
1008 | |
1009 | visit_end_list(m, errp); |
1010 | } |
1011 | |
1012 | void visit_type_PciDeviceInfo(Visitor *m, PciDeviceInfo ** obj, const char *name, Error **errp) |
1013 | { |
1014 | if (error_is_set(errp)) { |
1015 | return; |
1016 | } |
1017 | visit_start_struct(m, (void **)obj, "PciDeviceInfo", name, sizeof(PciDeviceInfo), errp); |
1018 | if (obj && !*obj) { |
1019 | goto end; |
1020 | } |
1021 | visit_type_int(m, (obj && *obj) ? &(*obj)->bus : NULL((void*)0), "bus", errp); |
1022 | visit_type_int(m, (obj && *obj) ? &(*obj)->slot : NULL((void*)0), "slot", errp); |
1023 | visit_type_int(m, (obj && *obj) ? &(*obj)->function : NULL((void*)0), "function", errp); |
1024 | visit_start_struct(m, NULL((void*)0), "", "class_info", 0, errp); |
1025 | visit_start_optional(m, (obj && *obj) ? &(*obj)->class_info.has_desc : NULL((void*)0), "desc", errp); |
1026 | if ((*obj)->class_info.has_desc) { |
1027 | visit_type_str(m, (obj && *obj) ? &(*obj)->class_info.desc : NULL((void*)0), "desc", errp); |
1028 | } |
1029 | visit_end_optional(m, errp); |
1030 | visit_type_int(m, (obj && *obj) ? &(*obj)->class_info.class : NULL((void*)0), "class", errp); |
1031 | visit_end_struct(m, errp); |
1032 | visit_start_struct(m, NULL((void*)0), "", "id", 0, errp); |
1033 | visit_type_int(m, (obj && *obj) ? &(*obj)->id.device : NULL((void*)0), "device", errp); |
1034 | visit_type_int(m, (obj && *obj) ? &(*obj)->id.vendor : NULL((void*)0), "vendor", errp); |
1035 | visit_end_struct(m, errp); |
1036 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_irq : NULL((void*)0), "irq", errp); |
1037 | if ((*obj)->has_irq) { |
1038 | visit_type_int(m, (obj && *obj) ? &(*obj)->irq : NULL((void*)0), "irq", errp); |
1039 | } |
1040 | visit_end_optional(m, errp); |
1041 | visit_type_str(m, (obj && *obj) ? &(*obj)->qdev_id : NULL((void*)0), "qdev_id", errp); |
1042 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_pci_bridge : NULL((void*)0), "pci_bridge", errp); |
1043 | if ((*obj)->has_pci_bridge) { |
1044 | visit_type_PciBridgeInfo(m, (obj && *obj) ? &(*obj)->pci_bridge : NULL((void*)0), "pci_bridge", errp); |
1045 | } |
1046 | visit_end_optional(m, errp); |
1047 | visit_type_PciMemoryRegionList(m, (obj && *obj) ? &(*obj)->regions : NULL((void*)0), "regions", errp); |
1048 | end: |
1049 | visit_end_struct(m, errp); |
1050 | } |
1051 | |
1052 | void visit_type_PciDeviceInfoList(Visitor *m, PciDeviceInfoList ** obj, const char *name, Error **errp) |
1053 | { |
1054 | GenericList *i, **prev = (GenericList **)obj; |
1055 | |
1056 | if (error_is_set(errp)) { |
1057 | return; |
1058 | } |
1059 | visit_start_list(m, name, errp); |
1060 | |
1061 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1062 | PciDeviceInfoList *native_i = (PciDeviceInfoList *)i; |
1063 | visit_type_PciDeviceInfo(m, &native_i->value, NULL((void*)0), errp); |
1064 | } |
1065 | |
1066 | visit_end_list(m, errp); |
1067 | } |
1068 | |
1069 | void visit_type_PciInfo(Visitor *m, PciInfo ** obj, const char *name, Error **errp) |
1070 | { |
1071 | if (error_is_set(errp)) { |
1072 | return; |
1073 | } |
1074 | visit_start_struct(m, (void **)obj, "PciInfo", name, sizeof(PciInfo), errp); |
1075 | if (obj && !*obj) { |
1076 | goto end; |
1077 | } |
1078 | visit_type_int(m, (obj && *obj) ? &(*obj)->bus : NULL((void*)0), "bus", errp); |
1079 | visit_type_PciDeviceInfoList(m, (obj && *obj) ? &(*obj)->devices : NULL((void*)0), "devices", errp); |
1080 | end: |
1081 | visit_end_struct(m, errp); |
1082 | } |
1083 | |
1084 | void visit_type_PciInfoList(Visitor *m, PciInfoList ** obj, const char *name, Error **errp) |
1085 | { |
1086 | GenericList *i, **prev = (GenericList **)obj; |
1087 | |
1088 | if (error_is_set(errp)) { |
1089 | return; |
1090 | } |
1091 | visit_start_list(m, name, errp); |
1092 | |
1093 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1094 | PciInfoList *native_i = (PciInfoList *)i; |
1095 | visit_type_PciInfo(m, &native_i->value, NULL((void*)0), errp); |
1096 | } |
1097 | |
1098 | visit_end_list(m, errp); |
1099 | } |
1100 | |
1101 | void visit_type_BlockJobInfo(Visitor *m, BlockJobInfo ** obj, const char *name, Error **errp) |
1102 | { |
1103 | if (error_is_set(errp)) { |
1104 | return; |
1105 | } |
1106 | visit_start_struct(m, (void **)obj, "BlockJobInfo", name, sizeof(BlockJobInfo), errp); |
1107 | if (obj && !*obj) { |
1108 | goto end; |
1109 | } |
1110 | visit_type_str(m, (obj && *obj) ? &(*obj)->type : NULL((void*)0), "type", errp); |
1111 | visit_type_str(m, (obj && *obj) ? &(*obj)->device : NULL((void*)0), "device", errp); |
1112 | visit_type_int(m, (obj && *obj) ? &(*obj)->len : NULL((void*)0), "len", errp); |
1113 | visit_type_int(m, (obj && *obj) ? &(*obj)->offset : NULL((void*)0), "offset", errp); |
1114 | visit_type_int(m, (obj && *obj) ? &(*obj)->speed : NULL((void*)0), "speed", errp); |
1115 | end: |
1116 | visit_end_struct(m, errp); |
1117 | } |
1118 | |
1119 | void visit_type_BlockJobInfoList(Visitor *m, BlockJobInfoList ** obj, const char *name, Error **errp) |
1120 | { |
1121 | GenericList *i, **prev = (GenericList **)obj; |
1122 | |
1123 | if (error_is_set(errp)) { |
1124 | return; |
1125 | } |
1126 | visit_start_list(m, name, errp); |
1127 | |
1128 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1129 | BlockJobInfoList *native_i = (BlockJobInfoList *)i; |
1130 | visit_type_BlockJobInfo(m, &native_i->value, NULL((void*)0), errp); |
1131 | } |
1132 | |
1133 | visit_end_list(m, errp); |
1134 | } |
1135 | |
1136 | void visit_type_NewImageMode(Visitor *m, NewImageMode * obj, const char *name, Error **errp) |
1137 | { |
1138 | visit_type_enum(m, (int *)obj, NewImageMode_lookup, "NewImageMode", name, errp); |
1139 | } |
1140 | |
1141 | void visit_type_BlockdevSnapshot(Visitor *m, BlockdevSnapshot ** obj, const char *name, Error **errp) |
1142 | { |
1143 | if (error_is_set(errp)) { |
1144 | return; |
1145 | } |
1146 | visit_start_struct(m, (void **)obj, "BlockdevSnapshot", name, sizeof(BlockdevSnapshot), errp); |
1147 | if (obj && !*obj) { |
1148 | goto end; |
1149 | } |
1150 | visit_type_str(m, (obj && *obj) ? &(*obj)->device : NULL((void*)0), "device", errp); |
1151 | visit_type_str(m, (obj && *obj) ? &(*obj)->snapshot_file : NULL((void*)0), "snapshot-file", errp); |
1152 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_format : NULL((void*)0), "format", errp); |
1153 | if ((*obj)->has_format) { |
1154 | visit_type_str(m, (obj && *obj) ? &(*obj)->format : NULL((void*)0), "format", errp); |
1155 | } |
1156 | visit_end_optional(m, errp); |
1157 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_mode : NULL((void*)0), "mode", errp); |
1158 | if ((*obj)->has_mode) { |
1159 | visit_type_NewImageMode(m, (obj && *obj) ? &(*obj)->mode : NULL((void*)0), "mode", errp); |
1160 | } |
1161 | visit_end_optional(m, errp); |
1162 | end: |
1163 | visit_end_struct(m, errp); |
1164 | } |
1165 | |
1166 | void visit_type_BlockdevSnapshotList(Visitor *m, BlockdevSnapshotList ** obj, const char *name, Error **errp) |
1167 | { |
1168 | GenericList *i, **prev = (GenericList **)obj; |
1169 | |
1170 | if (error_is_set(errp)) { |
1171 | return; |
1172 | } |
1173 | visit_start_list(m, name, errp); |
1174 | |
1175 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1176 | BlockdevSnapshotList *native_i = (BlockdevSnapshotList *)i; |
1177 | visit_type_BlockdevSnapshot(m, &native_i->value, NULL((void*)0), errp); |
1178 | } |
1179 | |
1180 | visit_end_list(m, errp); |
1181 | } |
1182 | |
1183 | void visit_type_BlockdevActionKind(Visitor *m, BlockdevActionKind * obj, const char *name, Error **errp) |
1184 | { |
1185 | visit_type_enum(m, (int *)obj, BlockdevActionKind_lookup, "BlockdevActionKind", name, errp); |
1186 | } |
1187 | |
1188 | void visit_type_BlockdevAction(Visitor *m, BlockdevAction ** obj, const char *name, Error **errp) |
1189 | { |
1190 | Error *err = NULL((void*)0); |
1191 | |
1192 | if (error_is_set(errp)) { |
1193 | return; |
1194 | } |
1195 | visit_start_struct(m, (void **)obj, "BlockdevAction", name, sizeof(BlockdevAction), &err); |
1196 | if (obj && !*obj) { |
1197 | goto end; |
1198 | } |
1199 | visit_type_BlockdevActionKind(m, &(*obj)->kind, "type", &err); |
1200 | if (err) { |
1201 | error_propagate(errp, err); |
1202 | goto end; |
1203 | } |
1204 | switch ((*obj)->kind) { |
1205 | case BLOCKDEV_ACTION_KIND_BLOCKDEV_SNAPSHOT_SYNC: |
1206 | visit_type_BlockdevSnapshot(m, &(*obj)->blockdev_snapshot_sync, "data", errp); |
1207 | break; |
1208 | default: |
1209 | abort(); |
1210 | } |
1211 | end: |
1212 | visit_end_struct(m, errp); |
1213 | } |
1214 | |
1215 | void visit_type_BlockdevActionList(Visitor *m, BlockdevActionList ** obj, const char *name, Error **errp) |
1216 | { |
1217 | GenericList *i, **prev = (GenericList **)obj; |
1218 | |
1219 | if (error_is_set(errp)) { |
1220 | return; |
1221 | } |
1222 | visit_start_list(m, name, errp); |
1223 | |
1224 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1225 | BlockdevActionList *native_i = (BlockdevActionList *)i; |
1226 | visit_type_BlockdevAction(m, &native_i->value, NULL((void*)0), errp); |
1227 | } |
1228 | |
1229 | visit_end_list(m, errp); |
1230 | } |
1231 | |
1232 | void visit_type_ObjectPropertyInfo(Visitor *m, ObjectPropertyInfo ** obj, const char *name, Error **errp) |
1233 | { |
1234 | if (error_is_set(errp)) { |
1235 | return; |
1236 | } |
1237 | visit_start_struct(m, (void **)obj, "ObjectPropertyInfo", name, sizeof(ObjectPropertyInfo), errp); |
1238 | if (obj && !*obj) { |
1239 | goto end; |
1240 | } |
1241 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
1242 | visit_type_str(m, (obj && *obj) ? &(*obj)->type : NULL((void*)0), "type", errp); |
1243 | end: |
1244 | visit_end_struct(m, errp); |
1245 | } |
1246 | |
1247 | void visit_type_ObjectPropertyInfoList(Visitor *m, ObjectPropertyInfoList ** obj, const char *name, Error **errp) |
1248 | { |
1249 | GenericList *i, **prev = (GenericList **)obj; |
1250 | |
1251 | if (error_is_set(errp)) { |
1252 | return; |
1253 | } |
1254 | visit_start_list(m, name, errp); |
1255 | |
1256 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1257 | ObjectPropertyInfoList *native_i = (ObjectPropertyInfoList *)i; |
1258 | visit_type_ObjectPropertyInfo(m, &native_i->value, NULL((void*)0), errp); |
1259 | } |
1260 | |
1261 | visit_end_list(m, errp); |
1262 | } |
1263 | |
1264 | void visit_type_ObjectTypeInfo(Visitor *m, ObjectTypeInfo ** obj, const char *name, Error **errp) |
1265 | { |
1266 | if (error_is_set(errp)) { |
1267 | return; |
1268 | } |
1269 | visit_start_struct(m, (void **)obj, "ObjectTypeInfo", name, sizeof(ObjectTypeInfo), errp); |
1270 | if (obj && !*obj) { |
1271 | goto end; |
1272 | } |
1273 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
1274 | end: |
1275 | visit_end_struct(m, errp); |
1276 | } |
1277 | |
1278 | void visit_type_ObjectTypeInfoList(Visitor *m, ObjectTypeInfoList ** obj, const char *name, Error **errp) |
1279 | { |
1280 | GenericList *i, **prev = (GenericList **)obj; |
1281 | |
1282 | if (error_is_set(errp)) { |
1283 | return; |
1284 | } |
1285 | visit_start_list(m, name, errp); |
1286 | |
1287 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
1288 | ObjectTypeInfoList *native_i = (ObjectTypeInfoList *)i; |
1289 | visit_type_ObjectTypeInfo(m, &native_i->value, NULL((void*)0), errp); |
1290 | } |
1291 | |
1292 | visit_end_list(m, errp); |
1293 | } |