diff options
author | Markus Armbruster <armbru@redhat.com> | 2017-08-24 10:46:08 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2017-09-04 13:09:13 +0200 |
commit | 977c736f80c232de7c6476d793ed575359c049d8 (patch) | |
tree | 986bf327e75929660aa367008574343e59818ee4 /hw | |
parent | 5b5f825d44306b18509cd10ba9ac6983e90d6e0f (diff) |
qapi: Mechanically convert FOO_lookup[...] to FOO_str(...)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <1503564371-26090-14-git-send-email-armbru@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/block/fdc.c | 6 | ||||
-rw-r--r-- | hw/char/escc.c | 2 | ||||
-rw-r--r-- | hw/input/virtio-input-hid.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 401129073b..db40e174c9 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -392,9 +392,9 @@ static int pick_geometry(FDrive *drv) FLOPPY_DPRINTF("User requested floppy drive type '%s', " "but inserted medium appears to be a " "%"PRId64" sector '%s' type\n", - FloppyDriveType_lookup[drv->drive], + FloppyDriveType_str(drv->drive), nb_sectors, - FloppyDriveType_lookup[parse->drive]); + FloppyDriveType_str(parse->drive)); } match = type_match; } @@ -403,7 +403,7 @@ static int pick_geometry(FDrive *drv) if (match == -1) { error_setg(&error_abort, "No candidate geometries present in table " " for floppy drive type '%s'", - FloppyDriveType_lookup[drv->drive]); + FloppyDriveType_str(drv->drive)); } parse = &(fd_formats[match]); diff --git a/hw/char/escc.c b/hw/char/escc.c index 1aca564e33..3ab831a6a7 100644 --- a/hw/char/escc.c +++ b/hw/char/escc.c @@ -848,7 +848,7 @@ static void sunkbd_handle_event(DeviceState *dev, QemuConsole *src, assert(evt->type == INPUT_EVENT_KIND_KEY); key = evt->u.key.data; qcode = qemu_input_key_value_to_qcode(key->key); - trace_escc_sunkbd_event_in(qcode, QKeyCode_lookup[qcode], + trace_escc_sunkbd_event_in(qcode, QKeyCode_str(qcode), key->down); if (qcode == Q_KEY_CODE_CAPS_LOCK) { diff --git a/hw/input/virtio-input-hid.c b/hw/input/virtio-input-hid.c index 46c038110c..4d3afc1b14 100644 --- a/hw/input/virtio-input-hid.c +++ b/hw/input/virtio-input-hid.c @@ -209,7 +209,7 @@ static void virtio_input_handle_event(DeviceState *dev, QemuConsole *src, } else { if (key->down) { fprintf(stderr, "%s: unmapped key: %d [%s]\n", __func__, - qcode, QKeyCode_lookup[qcode]); + qcode, QKeyCode_str(qcode)); } } break; @@ -224,7 +224,7 @@ static void virtio_input_handle_event(DeviceState *dev, QemuConsole *src, if (btn->down) { fprintf(stderr, "%s: unmapped button: %d [%s]\n", __func__, btn->button, - InputButton_lookup[btn->button]); + InputButton_str(btn->button)); } } break; |