From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNqR4-0004us-Tt for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:34:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNqQz-0001Lr-TR for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:34:46 -0400 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:47514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNqQz-0001Lg-Ac for qemu-devel@nongnu.org; Mon, 15 Oct 2012 15:34:41 -0400 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Oct 2012 01:04:39 +0530 Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9FJYanc4522410 for ; Tue, 16 Oct 2012 01:04:37 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9FJYaRg002723 for ; Tue, 16 Oct 2012 06:34:36 +1100 From: Anthony Liguori Date: Mon, 15 Oct 2012 14:34:16 -0500 Message-Id: <1350329657-18665-6-git-send-email-aliguori@us.ibm.com> In-Reply-To: <1350329657-18665-1-git-send-email-aliguori@us.ibm.com> References: <1350329657-18665-1-git-send-email-aliguori@us.ibm.com> Subject: [Qemu-devel] [PATCH 5/6] chardev: switch the easy backends to realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Paolo Bonzini , Anthony Liguori , Gerd Hoffmann , Andreas Faerber For backends that take no options, switching to realize is trivially easy. Signed-off-by: Anthony Liguori --- 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