Revision 1f51470d spice-qemu-char.c
b/spice-qemu-char.c | ||
---|---|---|
188 | 188 |
fprintf(stderr, "\n"); |
189 | 189 |
} |
190 | 190 |
|
191 |
int qemu_chr_open_spice(QemuOpts *opts, CharDriverState **_chr)
|
|
191 |
CharDriverState *qemu_chr_open_spice(QemuOpts *opts)
|
|
192 | 192 |
{ |
193 | 193 |
CharDriverState *chr; |
194 | 194 |
SpiceCharDriver *s; |
... | ... | |
200 | 200 |
if (name == NULL) { |
201 | 201 |
fprintf(stderr, "spice-qemu-char: missing name parameter\n"); |
202 | 202 |
print_allowed_subtypes(); |
203 |
return -EINVAL;
|
|
203 |
return NULL;
|
|
204 | 204 |
} |
205 | 205 |
for(;*psubtype != NULL; ++psubtype) { |
206 | 206 |
if (strcmp(name, *psubtype) == 0) { |
... | ... | |
211 | 211 |
if (subtype == NULL) { |
212 | 212 |
fprintf(stderr, "spice-qemu-char: unsupported name\n"); |
213 | 213 |
print_allowed_subtypes(); |
214 |
return -EINVAL;
|
|
214 |
return NULL;
|
|
215 | 215 |
} |
216 | 216 |
|
217 | 217 |
chr = g_malloc0(sizeof(CharDriverState)); |
... | ... | |
233 | 233 |
} |
234 | 234 |
#endif |
235 | 235 |
|
236 |
*_chr = chr; |
|
237 |
return 0; |
|
236 |
return chr; |
|
238 | 237 |
} |
Also available in: Unified diff