chr->init(chr);
}
-CharDriverState *text_console_init(QemuOpts *opts)
+int text_console_init(QemuOpts *opts, CharDriverState **_chr)
{
CharDriverState *chr;
TextConsole *s;
if (!s) {
free(chr);
- return NULL;
+ return -EBUSY;
}
s->chr = chr;
s->g_height = height;
chr->opaque = s;
chr->chr_set_echo = text_console_set_echo;
- return chr;
+
+ *_chr = chr;
+ return 0;
}
void text_consoles_set_display(DisplayState *ds)