1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | #include "qga-qapi-visit.h" |
17 | |
18 | void visit_type_GuestAgentCommandInfo(Visitor *m, GuestAgentCommandInfo ** obj, const char *name, Error **errp) |
19 | { |
20 | if (error_is_set(errp)) { |
21 | return; |
22 | } |
23 | visit_start_struct(m, (void **)obj, "GuestAgentCommandInfo", name, sizeof(GuestAgentCommandInfo), errp); |
24 | if (obj && !*obj) { |
25 | goto end; |
26 | } |
27 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
28 | visit_type_bool(m, (obj && *obj) ? &(*obj)->enabled : NULL((void*)0), "enabled", errp); |
29 | end: |
30 | visit_end_struct(m, errp); |
31 | } |
32 | |
33 | void visit_type_GuestAgentCommandInfoList(Visitor *m, GuestAgentCommandInfoList ** obj, const char *name, Error **errp) |
34 | { |
35 | GenericList *i, **prev = (GenericList **)obj; |
36 | |
37 | if (error_is_set(errp)) { |
38 | return; |
39 | } |
40 | visit_start_list(m, name, errp); |
41 | |
42 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
43 | GuestAgentCommandInfoList *native_i = (GuestAgentCommandInfoList *)i; |
44 | visit_type_GuestAgentCommandInfo(m, &native_i->value, NULL((void*)0), errp); |
45 | } |
46 | |
47 | visit_end_list(m, errp); |
48 | } |
49 | |
50 | void visit_type_GuestAgentInfo(Visitor *m, GuestAgentInfo ** obj, const char *name, Error **errp) |
51 | { |
52 | if (error_is_set(errp)) { |
53 | return; |
54 | } |
55 | visit_start_struct(m, (void **)obj, "GuestAgentInfo", name, sizeof(GuestAgentInfo), errp); |
56 | if (obj && !*obj) { |
57 | goto end; |
58 | } |
59 | visit_type_str(m, (obj && *obj) ? &(*obj)->version : NULL((void*)0), "version", errp); |
60 | visit_type_GuestAgentCommandInfoList(m, (obj && *obj) ? &(*obj)->supported_commands : NULL((void*)0), "supported_commands", errp); |
61 | end: |
62 | visit_end_struct(m, errp); |
63 | } |
64 | |
65 | void visit_type_GuestAgentInfoList(Visitor *m, GuestAgentInfoList ** obj, const char *name, Error **errp) |
66 | { |
67 | GenericList *i, **prev = (GenericList **)obj; |
68 | |
69 | if (error_is_set(errp)) { |
70 | return; |
71 | } |
72 | visit_start_list(m, name, errp); |
73 | |
74 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
75 | GuestAgentInfoList *native_i = (GuestAgentInfoList *)i; |
76 | visit_type_GuestAgentInfo(m, &native_i->value, NULL((void*)0), errp); |
77 | } |
78 | |
79 | visit_end_list(m, errp); |
80 | } |
81 | |
82 | void visit_type_GuestFileRead(Visitor *m, GuestFileRead ** obj, const char *name, Error **errp) |
83 | { |
84 | if (error_is_set(errp)) { |
85 | return; |
86 | } |
87 | visit_start_struct(m, (void **)obj, "GuestFileRead", name, sizeof(GuestFileRead), errp); |
88 | if (obj && !*obj) { |
89 | goto end; |
90 | } |
91 | visit_type_int(m, (obj && *obj) ? &(*obj)->count : NULL((void*)0), "count", errp); |
92 | visit_type_str(m, (obj && *obj) ? &(*obj)->buf_b64 : NULL((void*)0), "buf-b64", errp); |
93 | visit_type_bool(m, (obj && *obj) ? &(*obj)->eof : NULL((void*)0), "eof", errp); |
94 | end: |
95 | visit_end_struct(m, errp); |
96 | } |
97 | |
98 | void visit_type_GuestFileReadList(Visitor *m, GuestFileReadList ** obj, const char *name, Error **errp) |
99 | { |
100 | GenericList *i, **prev = (GenericList **)obj; |
101 | |
102 | if (error_is_set(errp)) { |
103 | return; |
104 | } |
105 | visit_start_list(m, name, errp); |
106 | |
107 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
108 | GuestFileReadList *native_i = (GuestFileReadList *)i; |
109 | visit_type_GuestFileRead(m, &native_i->value, NULL((void*)0), errp); |
110 | } |
111 | |
112 | visit_end_list(m, errp); |
113 | } |
114 | |
115 | void visit_type_GuestFileWrite(Visitor *m, GuestFileWrite ** obj, const char *name, Error **errp) |
116 | { |
117 | if (error_is_set(errp)) { |
118 | return; |
119 | } |
120 | visit_start_struct(m, (void **)obj, "GuestFileWrite", name, sizeof(GuestFileWrite), errp); |
121 | if (obj && !*obj) { |
122 | goto end; |
123 | } |
124 | visit_type_int(m, (obj && *obj) ? &(*obj)->count : NULL((void*)0), "count", errp); |
125 | visit_type_bool(m, (obj && *obj) ? &(*obj)->eof : NULL((void*)0), "eof", errp); |
126 | end: |
127 | visit_end_struct(m, errp); |
128 | } |
129 | |
130 | void visit_type_GuestFileWriteList(Visitor *m, GuestFileWriteList ** obj, const char *name, Error **errp) |
131 | { |
132 | GenericList *i, **prev = (GenericList **)obj; |
133 | |
134 | if (error_is_set(errp)) { |
135 | return; |
136 | } |
137 | visit_start_list(m, name, errp); |
138 | |
139 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
140 | GuestFileWriteList *native_i = (GuestFileWriteList *)i; |
141 | visit_type_GuestFileWrite(m, &native_i->value, NULL((void*)0), errp); |
142 | } |
143 | |
144 | visit_end_list(m, errp); |
145 | } |
146 | |
147 | void visit_type_GuestFileSeek(Visitor *m, GuestFileSeek ** obj, const char *name, Error **errp) |
148 | { |
149 | if (error_is_set(errp)) { |
150 | return; |
151 | } |
152 | visit_start_struct(m, (void **)obj, "GuestFileSeek", name, sizeof(GuestFileSeek), errp); |
153 | if (obj && !*obj) { |
154 | goto end; |
155 | } |
156 | visit_type_int(m, (obj && *obj) ? &(*obj)->position : NULL((void*)0), "position", errp); |
157 | visit_type_bool(m, (obj && *obj) ? &(*obj)->eof : NULL((void*)0), "eof", errp); |
158 | end: |
159 | visit_end_struct(m, errp); |
160 | } |
161 | |
162 | void visit_type_GuestFileSeekList(Visitor *m, GuestFileSeekList ** obj, const char *name, Error **errp) |
163 | { |
164 | GenericList *i, **prev = (GenericList **)obj; |
165 | |
166 | if (error_is_set(errp)) { |
167 | return; |
168 | } |
169 | visit_start_list(m, name, errp); |
170 | |
171 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
172 | GuestFileSeekList *native_i = (GuestFileSeekList *)i; |
173 | visit_type_GuestFileSeek(m, &native_i->value, NULL((void*)0), errp); |
174 | } |
175 | |
176 | visit_end_list(m, errp); |
177 | } |
178 | |
179 | void visit_type_GuestFsfreezeStatus(Visitor *m, GuestFsfreezeStatus * obj, const char *name, Error **errp) |
180 | { |
181 | visit_type_enum(m, (int *)obj, GuestFsfreezeStatus_lookup, "GuestFsfreezeStatus", name, errp); |
182 | } |
183 | |
184 | void visit_type_GuestIpAddressType(Visitor *m, GuestIpAddressType * obj, const char *name, Error **errp) |
185 | { |
186 | visit_type_enum(m, (int *)obj, GuestIpAddressType_lookup, "GuestIpAddressType", name, errp); |
187 | } |
188 | |
189 | void visit_type_GuestIpAddress(Visitor *m, GuestIpAddress ** obj, const char *name, Error **errp) |
190 | { |
191 | if (error_is_set(errp)) { |
192 | return; |
193 | } |
194 | visit_start_struct(m, (void **)obj, "GuestIpAddress", name, sizeof(GuestIpAddress), errp); |
195 | if (obj && !*obj) { |
196 | goto end; |
197 | } |
198 | visit_type_str(m, (obj && *obj) ? &(*obj)->ip_address : NULL((void*)0), "ip-address", errp); |
199 | visit_type_GuestIpAddressType(m, (obj && *obj) ? &(*obj)->ip_address_type : NULL((void*)0), "ip-address-type", errp); |
200 | visit_type_int(m, (obj && *obj) ? &(*obj)->prefix : NULL((void*)0), "prefix", errp); |
201 | end: |
202 | visit_end_struct(m, errp); |
203 | } |
204 | |
205 | void visit_type_GuestIpAddressList(Visitor *m, GuestIpAddressList ** 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 | GuestIpAddressList *native_i = (GuestIpAddressList *)i; |
216 | visit_type_GuestIpAddress(m, &native_i->value, NULL((void*)0), errp); |
217 | } |
218 | |
219 | visit_end_list(m, errp); |
220 | } |
221 | |
222 | void visit_type_GuestNetworkInterface(Visitor *m, GuestNetworkInterface ** obj, const char *name, Error **errp) |
223 | { |
224 | if (error_is_set(errp)) { |
| |
225 | return; |
226 | } |
227 | visit_start_struct(m, (void **)obj, "GuestNetworkInterface", name, sizeof(GuestNetworkInterface), errp); |
228 | if (obj && !*obj) { |
| 2 | Assuming pointer value is null |
|
| |
229 | goto end; |
230 | } |
231 | visit_type_str(m, (obj && *obj) ? &(*obj)->name : NULL((void*)0), "name", errp); |
| |
232 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_hardware_address : NULL((void*)0), "hardware-address", errp); |
| |
233 | if ((*obj)->has_hardware_address) { |
| 6 | Dereference of null pointer loaded from variable 'obj' |
|
234 | visit_type_str(m, (obj && *obj) ? &(*obj)->hardware_address : NULL((void*)0), "hardware-address", errp); |
235 | } |
236 | visit_end_optional(m, errp); |
237 | visit_start_optional(m, (obj && *obj) ? &(*obj)->has_ip_addresses : NULL((void*)0), "ip-addresses", errp); |
238 | if ((*obj)->has_ip_addresses) { |
239 | visit_type_GuestIpAddressList(m, (obj && *obj) ? &(*obj)->ip_addresses : NULL((void*)0), "ip-addresses", errp); |
240 | } |
241 | visit_end_optional(m, errp); |
242 | end: |
243 | visit_end_struct(m, errp); |
244 | } |
245 | |
246 | void visit_type_GuestNetworkInterfaceList(Visitor *m, GuestNetworkInterfaceList ** obj, const char *name, Error **errp) |
247 | { |
248 | GenericList *i, **prev = (GenericList **)obj; |
249 | |
250 | if (error_is_set(errp)) { |
251 | return; |
252 | } |
253 | visit_start_list(m, name, errp); |
254 | |
255 | for (; (i = visit_next_list(m, prev, errp)) != NULL((void*)0); prev = &i) { |
256 | GuestNetworkInterfaceList *native_i = (GuestNetworkInterfaceList *)i; |
257 | visit_type_GuestNetworkInterface(m, &native_i->value, NULL((void*)0), errp); |
258 | } |
259 | |
260 | visit_end_list(m, errp); |
261 | } |