All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: libvir-list@redhat.com, "Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [Qemu-devel] [PULL 03/12] ui: use enum to string helpers
Date: Tue, 21 Aug 2018 14:05:33 +0200	[thread overview]
Message-ID: <20180821120542.22610-4-kraxel@redhat.com> (raw)
In-Reply-To: <20180821120542.22610-1-kraxel@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

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>
---
 qemu-keymap.c | 2 +-
 ui/console.c  | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/qemu-keymap.c b/qemu-keymap.c
index 6216371aa1..4d00468747 100644
--- a/qemu-keymap.c
+++ b/qemu-keymap.c
@@ -84,7 +84,7 @@ static void walk_map(struct xkb_keymap *map, xkb_keycode_t code, void *data)
     }
     fprintf(outfile, "# evdev %d (0x%x), QKeyCode \"%s\", number 0x%x\n",
             evdev, evdev,
-            QKeyCode_lookup.array[qcode],
+            QKeyCode_str(qcode),
             qcode_to_number(qcode));
 
     /*
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) {
-- 
2.9.3

  parent reply	other threads:[~2018-08-21 12:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-21 12:05 [Qemu-devel] [PULL 00/12] Ui 20180821 v2 patches Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 01/12] ui/sdl2: Remove the obsolete SDL_INIT_NOPARACHUTE flag Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 02/12] vnc: fix memleak of the "vnc-worker-output" name Gerd Hoffmann
2018-08-21 12:05 ` Gerd Hoffmann [this message]
2018-08-21 12:05 ` [Qemu-devel] [PULL 04/12] sdl2: redraw correctly when scanout_mode enabled Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 05/12] doc: switch to modern syntax for VNC TLS setup Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 06/12] vnc: remove support for deprecated tls, x509, x509verify options Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 07/12] spice-display: access ptr_x/ptr_y under Mutex Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 08/12] spice-display: fix qemu_spice_cursor_refresh_bh locking Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 09/12] ui/sdl2: Fix broken -full-screen CLI option Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 10/12] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 11/12] dmabuf: add y0_top, pass it to spice Gerd Hoffmann
2018-08-21 12:05 ` [Qemu-devel] [PULL 12/12] util: promote qemu_egl_rendernode_open() to libqemuutil Gerd Hoffmann
2018-08-23  9:22 ` [Qemu-devel] [PULL 00/12] Ui 20180821 v2 patches Peter Maydell
2018-08-23  9:57   ` Gerd Hoffmann
  -- strict thread matches above, loose matches on Subject: below --
2018-08-27  8:53 [Qemu-devel] [PULL 00/12] Ui 20180827 v4 patches Gerd Hoffmann
2018-08-27  8:53 ` [Qemu-devel] [PULL 03/12] ui: use enum to string helpers Gerd Hoffmann
2018-08-23  9:56 [Qemu-devel] [PULL 00/12] Ui 20180823 v3 patches Gerd Hoffmann
2018-08-23  9:56 ` [Qemu-devel] [PULL 03/12] ui: use enum to string helpers Gerd Hoffmann
2018-08-21  7:44 [Qemu-devel] [PULL 00/12] Ui 20180821 patches Gerd Hoffmann
2018-08-21  7:45 ` [Qemu-devel] [PULL 03/12] ui: use enum to string helpers Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180821120542.22610-4-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=libvir-list@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.