qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Marcelo Tosatti <mtosatti@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 3/7] console: use qemu_console_lookup_by_device_name in vnc_display_open
Date: Tue, 12 Jan 2016 13:29:35 +0100	[thread overview]
Message-ID: <1452601779-5790-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1452601779-5790-1-git-send-email-kraxel@redhat.com>

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 ui/vnc.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/ui/vnc.c b/ui/vnc.c
index 09756cd..95ef3bd 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -3725,19 +3725,12 @@ void vnc_display_open(const char *id, Error **errp)
 
     device_id = qemu_opt_get(opts, "display");
     if (device_id) {
-        DeviceState *dev;
         int head = qemu_opt_get_number(opts, "head", 0);
+        Error *err = NULL;
 
-        dev = qdev_find_recursive(sysbus_get_default(), device_id);
-        if (dev == NULL) {
-            error_setg(errp, "Device '%s' not found", device_id);
-            goto fail;
-        }
-
-        con = qemu_console_lookup_by_device(dev, head);
-        if (con == NULL) {
-            error_setg(errp, "Device %s is not bound to a QemuConsole",
-                       device_id);
+        con = qemu_console_lookup_by_device_name(device_id, head, &err);
+        if (err) {
+            error_propagate(errp, err);
             goto fail;
         }
     } else {
-- 
1.8.3.1

  parent reply	other threads:[~2016-01-12 12:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-12 12:29 [Qemu-devel] [PATCH 1/7] console: add qemu_console_lookup_by_device_name Gerd Hoffmann
2016-01-12 12:29 ` [Qemu-devel] [PATCH 2/7] console: use qemu_console_lookup_by_device_name in qemu_input_handler_bind Gerd Hoffmann
2016-01-12 12:43   ` Daniel P. Berrange
2016-01-12 12:29 ` Gerd Hoffmann [this message]
2016-01-12 12:43   ` [Qemu-devel] [PATCH 3/7] console: use qemu_console_lookup_by_device_name in vnc_display_open Daniel P. Berrange
2016-01-12 12:29 ` [Qemu-devel] [PATCH 4/7] qapi: switch x-input-send-event from console to device+head Gerd Hoffmann
2016-01-12 12:47   ` Daniel P. Berrange
2016-01-15 16:25   ` Markus Armbruster
2016-01-12 12:29 ` [Qemu-devel] [PATCH 5/7] qapi: rename input buttons Gerd Hoffmann
2016-01-12 12:49   ` Daniel P. Berrange
2016-01-15 16:50   ` Markus Armbruster
2016-01-12 12:29 ` [Qemu-devel] [PATCH 6/7] qapi: rename input axises Gerd Hoffmann
2016-01-12 12:50   ` Daniel P. Berrange
2016-01-15 16:51   ` Markus Armbruster
2016-01-12 12:29 ` [Qemu-devel] [PATCH 7/7] qapi: promote input-send-event to stable Gerd Hoffmann
2016-01-12 12:53   ` Daniel P. Berrange
2016-01-12 13:04     ` Gerd Hoffmann
2016-01-15 16:58       ` Markus Armbruster
2016-01-12 12:42 ` [Qemu-devel] [PATCH 1/7] console: add qemu_console_lookup_by_device_name Daniel P. Berrange
2016-01-15 16:22 ` Markus Armbruster
2016-01-15 16:41   ` Markus Armbruster
2016-01-15 16:45     ` Markus Armbruster

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=1452601779-5790-3-git-send-email-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=armbru@redhat.com \
    --cc=mtosatti@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).