mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
ui/console: allow to override the default VC
If a display is backed by a specialized VC, allow to override the default "vc:80Cx24C". As suggested by Paolo, if the display doesn't implement a VC (get_vc() returns NULL), use a fallback that will use a muxed console on stdio. This changes the behaviour of "qemu -display none", to create a muxed serial/monitor by default (on TTY & not daemonized). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
2aeaa4b200
commit
1bec1cc0da
3 changed files with 33 additions and 10 deletions
14
ui/console.c
14
ui/console.c
|
@ -1675,6 +1675,20 @@ void qemu_display_init(DisplayState *ds, DisplayOptions *opts)
|
|||
dpys[opts->type]->init(ds, opts);
|
||||
}
|
||||
|
||||
const char *qemu_display_get_vc(DisplayOptions *opts)
|
||||
{
|
||||
assert(opts->type < DISPLAY_TYPE__MAX);
|
||||
if (opts->type == DISPLAY_TYPE_NONE) {
|
||||
return NULL;
|
||||
}
|
||||
assert(dpys[opts->type] != NULL);
|
||||
if (dpys[opts->type]->vc) {
|
||||
return dpys[opts->type]->vc;
|
||||
} else {
|
||||
return "vc:80Cx24C";
|
||||
}
|
||||
}
|
||||
|
||||
void qemu_display_help(void)
|
||||
{
|
||||
int idx;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue