From f2c1d54c186c400ec676ec4d29ea4b8bf440c054 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 12 Jan 2016 11:45:43 +0100 Subject: console: add & use qemu_console_lookup_by_device_name We have two places needing this, and a third one will come shortly. So factor things out into a helper function to reduce code duplication. Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel P. Berrange Reviewed-by: Markus Armbruster --- include/ui/console.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/ui') diff --git a/include/ui/console.h b/include/ui/console.h index 6631b9690a..f63697182f 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -378,6 +378,8 @@ void graphic_hw_gl_block(QemuConsole *con, bool block); QemuConsole *qemu_console_lookup_by_index(unsigned int index); QemuConsole *qemu_console_lookup_by_device(DeviceState *dev, uint32_t head); +QemuConsole *qemu_console_lookup_by_device_name(const char *device_id, + uint32_t head, Error **errp); bool qemu_console_is_visible(QemuConsole *con); bool qemu_console_is_graphic(QemuConsole *con); bool qemu_console_is_fixedsize(QemuConsole *con); -- cgit v1.2.3