mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
console: add ui module loading support
If a requested user interface is not available, try loading it as module, simliar to block layer modules. Needed to keep things working when followup patches start to build user interfaces as modules. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20180301100547.18962-8-kraxel@redhat.com
This commit is contained in:
parent
898f9d41d0
commit
61b4d9a246
3 changed files with 8 additions and 0 deletions
|
@ -2198,6 +2198,9 @@ bool qemu_display_find_default(DisplayOptions *opts)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(prio); i++) {
|
||||
if (dpys[prio[i]] == NULL) {
|
||||
ui_module_load_one(DisplayType_lookup.array[prio[i]]);
|
||||
}
|
||||
if (dpys[prio[i]] == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
@ -2213,6 +2216,9 @@ void qemu_display_early_init(DisplayOptions *opts)
|
|||
if (opts->type == DISPLAY_TYPE_NONE) {
|
||||
return;
|
||||
}
|
||||
if (dpys[opts->type] == NULL) {
|
||||
ui_module_load_one(DisplayType_lookup.array[opts->type]);
|
||||
}
|
||||
if (dpys[opts->type] == NULL) {
|
||||
error_report("Display '%s' is not available.",
|
||||
DisplayType_lookup.array[opts->type]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue