qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Andreas Faerber <afaerber@suse.de>
Subject: [Qemu-devel] [PATCH 5/6] chardev: switch the easy backends to realize
Date: Mon, 15 Oct 2012 14:34:16 -0500	[thread overview]
Message-ID: <1350329657-18665-6-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1350329657-18665-1-git-send-email-aliguori@us.ibm.com>

For backends that take no options, switching to realize is trivially easy.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
 qemu-char.c |   12 ++++++------
 qemu-char.h |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index e9a81c7..bc0fdbe 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -221,7 +221,7 @@ static int null_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
     return len;
 }
 
-static void qemu_chr_open_null(CharDriverState *chr, QemuOpts *opts, Error **errp)
+static void qemu_chr_open_null(CharDriverState *chr, Error **errp)
 {
     chr->chr_write = null_chr_write;
 }
@@ -1763,7 +1763,7 @@ static void qemu_chr_open_win_file(CharDriverState *chr, HANDLE fd_out)
     qemu_chr_generic_open(chr);
 }
 
-static void qemu_chr_open_win_con(CharDriverState *chr, QemuOpts *opts, Error **errp)
+static void qemu_chr_open_win_con(CharDriverState *chr, Error **errp)
 {
     qemu_chr_open_win_file(chr, GetStdHandle(STD_OUTPUT_HANDLE));
 }
@@ -1920,7 +1920,7 @@ static void win_stdio_close(CharDriverState *chr)
     stdio_nb_clients--;
 }
 
-static void qemu_chr_open_win_stdio(CharDriverState *chr, QemuOpts *opts, Error **errp)
+static void qemu_chr_open_win_stdio(CharDriverState *chr, Error **errp)
 {
     WinStdioCharState *stdio;
     DWORD              dwMode;
@@ -2693,7 +2693,7 @@ static void chardev_null_class_init(ObjectClass *klass, void *data)
 {
     CharDriverClass *cdc = CHARDEV_CLASS(klass);
 
-    cdc->open = qemu_chr_open_null;
+    cdc->realize = qemu_chr_open_null;
 }
 
 static const TypeInfo chardev_null_info = {
@@ -2774,7 +2774,7 @@ static void chardev_console_class_init(ObjectClass *klass, void *data)
 {
     CharDriverClass *cdc = CHARDEV_CLASS(klass);
 
-    cdc->open = qemu_chr_open_win_con;
+    cdc->realize = qemu_chr_open_win_con;
 }
 
 static const TypeInfo chardev_console_info = {
@@ -2864,7 +2864,7 @@ static void chardev_stdio_class_init(ObjectClass *klass, void *data)
     CharDriverClass *cdc = CHARDEV_CLASS(klass);
 
 #ifdef _WIN32
-    cdc->open = qemu_chr_open_win_stdio;
+    cdc->realize = qemu_chr_open_win_stdio;
 #else
     cdc->open = qemu_chr_open_stdio;
 #endif
diff --git a/qemu-char.h b/qemu-char.h
index be2a410..9e15dcd 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -68,7 +68,7 @@ struct CharDriverClass
 
     /* Objects should implement only one of these two methods */
     void (*open)(struct CharDriverState *chr, QemuOpts *opts, Error **errp);
-    void (*realize)(struct CharDriverState *chr, QemuOpts *opts, Error **errp);
+    void (*realize)(struct CharDriverState *chr, Error **errp);
 };
 
 struct CharDriverState {
-- 
1.7.5.4

  parent reply	other threads:[~2012-10-15 19:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 19:34 [Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM Anthony Liguori
2012-10-15 19:34 ` [Qemu-devel] [PATCH 1/6] object: add object_property_add_bool Anthony Liguori
2012-10-16 15:44   ` Andreas Färber
2012-10-23 11:30   ` Markus Armbruster
2012-10-15 19:34 ` [Qemu-devel] [PATCH 2/6] chardev: convert to QOM (shallow pass) Anthony Liguori
2012-10-15 19:34 ` [Qemu-devel] [PATCH 3/6] chardev: create new QOM types for each sub chardev type Anthony Liguori
2012-10-15 19:34 ` [Qemu-devel] [PATCH 4/6] chardev: implement realize Anthony Liguori
2012-10-15 19:34 ` Anthony Liguori [this message]
2012-10-15 19:34 ` [Qemu-devel] [PATCH 6/6] chardev: convert file backend to realize Anthony Liguori
2012-10-16 15:52   ` Paolo Bonzini
2012-10-16 19:44     ` Anthony Liguori
2012-10-17  8:07 ` [Qemu-devel] [RFC PATCH 0/6] chardev: convert to QOM Gerd Hoffmann
2012-10-17 14:44   ` Anthony Liguori

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=1350329657-18665-6-git-send-email-aliguori@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=afaerber@suse.de \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@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).