aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-08-01 11:25:08 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-08-24 08:40:10 +0200
commitc809d1d2f4e3d40d4767871d3cf9cd78391e5a4f (patch)
tree194bb9d8907dd13eac1cd25e8049aaafd11335ac /ui
parent0ae0b069aa8f23a138cc6d2d83edaa5c22f948a5 (diff)
ui: use enum to string helpers
Minor code simplification. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-id: 20180801092508.4927-1-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/console.c b/ui/console.c
index bc58458ee8..3a285bae00 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2319,7 +2319,7 @@ bool qemu_display_find_default(DisplayOptions *opts)
for (i = 0; i < ARRAY_SIZE(prio); i++) {
if (dpys[prio[i]] == NULL) {
- ui_module_load_one(DisplayType_lookup.array[prio[i]]);
+ ui_module_load_one(DisplayType_str(prio[i]));
}
if (dpys[prio[i]] == NULL) {
continue;
@@ -2337,11 +2337,11 @@ void qemu_display_early_init(DisplayOptions *opts)
return;
}
if (dpys[opts->type] == NULL) {
- ui_module_load_one(DisplayType_lookup.array[opts->type]);
+ ui_module_load_one(DisplayType_str(opts->type));
}
if (dpys[opts->type] == NULL) {
error_report("Display '%s' is not available.",
- DisplayType_lookup.array[opts->type]);
+ DisplayType_str(opts->type));
exit(1);
}
if (dpys[opts->type]->early_init) {