fprintf(stderr, "\n");
}
-int qemu_chr_open_spice(QemuOpts *opts, CharDriverState **_chr)
+CharDriverState *qemu_chr_open_spice(QemuOpts *opts)
{
CharDriverState *chr;
SpiceCharDriver *s;
if (name == NULL) {
fprintf(stderr, "spice-qemu-char: missing name parameter\n");
print_allowed_subtypes();
- return -EINVAL;
+ return NULL;
}
for(;*psubtype != NULL; ++psubtype) {
if (strcmp(name, *psubtype) == 0) {
}
}
if (subtype == NULL) {
- fprintf(stderr, "spice-qemu-char: unsupported name\n");
+ fprintf(stderr, "spice-qemu-char: unsupported name: %s\n", name);
print_allowed_subtypes();
- return -EINVAL;
+ return NULL;
}
chr = g_malloc0(sizeof(CharDriverState));
}
#endif
- *_chr = chr;
- return 0;
+ return chr;
}