All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Corey Minyard <minyard@acm.org>, qemu-devel@nongnu.org
Cc: Bret Ketchum <bcketchum@gmail.com>,
	Corey Minyard <cminyard@mvista.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 01/16] qemu-char: Allocate CharDriverState in qemu_chr_new_from_opts
Date: Thu, 23 Jan 2014 14:58:14 +0100	[thread overview]
Message-ID: <52E11FF6.1070405@suse.de> (raw)
In-Reply-To: <52E11A00.3060109@suse.de>

Am 23.01.2014 14:32, schrieb Andreas Färber:
> Am 12.11.2013 17:33, schrieb Corey Minyard:
>> This allocates the CharDriverState structure and passes it in to the
>> open routine.  This allows a coming option to automatically attempt to
>> reconnect a chardev if the connection fails.  The chardev has to be
>> kept around so a reconnect can be done on it.
>>
>> Signed-off-by: Corey Minyard <cminyard@mvista.com>
> [...]
>> diff --git a/include/ui/qemu-spice.h b/include/ui/qemu-spice.h
>> index 86c75c7..eadb9c9 100644
>> --- a/include/ui/qemu-spice.h
>> +++ b/include/ui/qemu-spice.h
>> @@ -46,9 +46,11 @@ int qemu_spice_migrate_info(const char *hostname, int port, int tls_port,
>>  void do_info_spice_print(Monitor *mon, const QObject *data);
>>  void do_info_spice(Monitor *mon, QObject **ret_data);
>>  
>> -CharDriverState *qemu_chr_open_spice_vmc(const char *type);
>> +CharDriverState *qemu_chr_open_spice_vmc(CharDriverState *chr,
>> +                                         const char *type);
>>  #if SPICE_SERVER_VERSION >= 0x000c02
>> -CharDriverState *qemu_chr_open_spice_port(const char *name);
>> +CharDriverState *qemu_chr_open_spice_port(CharDriverSTate *chr,
> 
> This needs to be CharDriverState.
> 
>> +                                          const char *name);
>>  void qemu_spice_register_ports(void);
>>  #else
>>  static inline CharDriverState *qemu_chr_open_spice_port(const char *name)
> [snip]

I also needed the following:

diff --git a/ui/gtk.c b/ui/gtk.c
index 6316f5b..c2210a2 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1113,11 +1113,8 @@ static int gd_vc_chr_write(CharDriverState *chr,
const uint8_t *buf, int len)
 static int nb_vcs;
 static CharDriverState *vcs[MAX_VCS];

-static CharDriverState *gd_vc_handler(ChardevVC *unused)
+static CharDriverState *gd_vc_handler(CharDriverState *chr, ChardevVC
*unused)
 {
-    CharDriverState *chr;
-
-    chr = g_malloc0(sizeof(*chr));
     chr->chr_write = gd_vc_chr_write;
     /* defer OPENED events until our vc is fully initialized */
     chr->explicit_be_open = true;

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2014-01-23 13:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-12 16:32 [Qemu-devel] [PATCH 00/16] Add an IPMI device to QEMU Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 01/16] qemu-char: Allocate CharDriverState in qemu_chr_new_from_opts Corey Minyard
2014-01-23 13:32   ` Andreas Färber
2014-01-23 13:58     ` Andreas Färber [this message]
2013-11-12 16:33 ` [Qemu-devel] [PATCH 02/16] qemu-char: Allow a chardev to reconnect if disconnected Corey Minyard
2013-11-12 16:43   ` Eric Blake
2013-11-12 17:08     ` Corey Minyard
2013-11-14  7:32       ` Michael S. Tsirkin
2013-11-14 13:29         ` Corey Minyard
2013-11-13  8:55   ` Gerd Hoffmann
2013-11-13 20:51     ` Corey Minyard
2013-11-14 13:56       ` Michael S. Tsirkin
2013-11-12 16:33 ` [Qemu-devel] [PATCH 03/16] qemu-char: remove free of chr from win_stdio_close Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 04/16] qemu-char: Close fd at end of file Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 05/16] Add a base IPMI interface Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 06/16] ipmi: Add a PC ISA type structure Corey Minyard
2014-01-29 14:58   ` Andreas Färber
2013-11-12 16:33 ` [Qemu-devel] [PATCH 07/16] ipmi: Add a KCS low-level interface Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 08/16] ipmi: Add a BT " Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 09/16] ipmi: Add a local BMC simulation Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 10/16] ipmi: Add an external connection simulation interface Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 11/16] ipmi: Add tests Corey Minyard
2013-11-13 14:12   ` Bret Ketchum
2013-11-13 20:51     ` Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 12/16] ipmi: Add documentation Corey Minyard
2013-11-13 16:08   ` Bret Ketchum
2013-11-12 16:33 ` [Qemu-devel] [PATCH 13/16] ipmi: Add migration capability to the IPMI device Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 14/16] pc: Postpone adding ACPI and SMBIOS to fw_cfg Corey Minyard
2013-11-13 14:31   ` Bret Ketchum
2013-11-14  7:30   ` Michael S. Tsirkin
2013-11-14 13:28     ` Corey Minyard
2013-11-14 13:38       ` Michael S. Tsirkin
2013-11-14 13:40         ` Corey Minyard
2013-11-14 13:50           ` Michael S. Tsirkin
2013-11-26 10:03           ` Michael S. Tsirkin
2013-11-12 16:33 ` [Qemu-devel] [PATCH 15/16] smbios: Add a function to directly add an entry Corey Minyard
2013-11-13 14:37   ` Bret Ketchum
2013-11-13 16:22     ` Andreas Färber
2013-11-13 20:52     ` Corey Minyard
2013-11-12 16:33 ` [Qemu-devel] [PATCH 16/16] ipmi: Add SMBIOS table entry Corey Minyard
2013-11-14  7:46   ` Michael S. Tsirkin
2013-11-14 13:43     ` Corey Minyard

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=52E11FF6.1070405@suse.de \
    --to=afaerber@suse.de \
    --cc=bcketchum@gmail.com \
    --cc=cminyard@mvista.com \
    --cc=minyard@acm.org \
    --cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.