From: Alon Levy <alevy@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
jcody@redhat.com, kraxel@redhat.com, spice-devel@freedesktop.org
Subject: Re: [Qemu-devel] [PATCH 05/21] char: add qemu_chr_fe_event()
Date: Mon, 18 Nov 2013 14:36:52 +0200 [thread overview]
Message-ID: <528A09E4.5070700@redhat.com> (raw)
In-Reply-To: <1384777531-14635-6-git-send-email-marcandre.lureau@gmail.com>
On 11/18/2013 02:25 PM, Marc-André Lureau wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
The patch description is incomplete, or the patch should be split - this
patch also implements qemu_chr_fe_event for spiceport.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> include/sysemu/char.h | 10 ++++++++++
> qemu-char.c | 7 +++++++
> spice-qemu-char.c | 10 ++++++++++
> 3 files changed, 27 insertions(+)
>
> diff --git a/include/sysemu/char.h b/include/sysemu/char.h
> index ad101d9..d23c8f1 100644
> --- a/include/sysemu/char.h
> +++ b/include/sysemu/char.h
> @@ -69,6 +69,7 @@ struct CharDriverState {
> void (*chr_accept_input)(struct CharDriverState *chr);
> void (*chr_set_echo)(struct CharDriverState *chr, bool echo);
> void (*chr_set_fe_open)(struct CharDriverState *chr, int fe_open);
> + void (*chr_fe_event)(struct CharDriverState *chr, int event);
> void *opaque;
> char *label;
> char *filename;
> @@ -138,6 +139,15 @@ void qemu_chr_fe_set_echo(struct CharDriverState *chr, bool echo);
> void qemu_chr_fe_set_open(struct CharDriverState *chr, int fe_open);
>
> /**
> + * @qemu_chr_fe_event:
> + *
> + * Send an event from the back end to the front end.
> + *
> + * @event the event to send
> + */
> +void qemu_chr_fe_event(CharDriverState *s, int event);
> +
> +/**
> * @qemu_chr_fe_printf:
> *
> * Write to a character backend using a printf style interface.
> diff --git a/qemu-char.c b/qemu-char.c
> index e00f84c..418dc69 100644
> --- a/qemu-char.c
> +++ b/qemu-char.c
> @@ -3353,6 +3353,13 @@ void qemu_chr_fe_set_open(struct CharDriverState *chr, int fe_open)
> }
> }
>
> +void qemu_chr_fe_event(struct CharDriverState *chr, int event)
> +{
> + if (chr->chr_fe_event) {
> + chr->chr_fe_event(chr, event);
> + }
> +}
> +
> int qemu_chr_fe_add_watch(CharDriverState *s, GIOCondition cond,
> GIOFunc func, void *user_data)
> {
> diff --git a/spice-qemu-char.c b/spice-qemu-char.c
> index e074d9e..16439c5 100644
> --- a/spice-qemu-char.c
> +++ b/spice-qemu-char.c
> @@ -222,6 +222,15 @@ static void spice_chr_set_fe_open(struct CharDriverState *chr, int fe_open)
> }
> }
>
> +static void spice_chr_fe_event(struct CharDriverState *chr, int event)
> +{
> +#if SPICE_SERVER_VERSION >= 0x000c02
> + SpiceCharDriver *s = chr->opaque;
> +
> + spice_server_port_event(&s->sin, event);
> +#endif
> +}
> +
> static void print_allowed_subtypes(void)
> {
> const char** psubtype;
> @@ -255,6 +264,7 @@ static CharDriverState *chr_open(const char *subtype)
> chr->chr_close = spice_chr_close;
> chr->chr_set_fe_open = spice_chr_set_fe_open;
> chr->explicit_be_open = true;
> + chr->chr_fe_event = spice_chr_fe_event;
>
> QLIST_INSERT_HEAD(&spice_chars, s, next);
>
>
next prev parent reply other threads:[~2013-11-18 12:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-18 12:25 [Qemu-devel] [PATCH 00/21] RFCv2: add Spice block device Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 01/21] vscclient: do not add a socket watch if there is not data to send Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 02/21] spice-char: remove unused field Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 03/21] qmp_change_blockdev() remove unused has_format Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 04/21] include: add missing config-host.h include Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 05/21] char: add qemu_chr_fe_event() Marc-André Lureau
2013-11-18 12:36 ` Alon Levy [this message]
2013-11-18 12:25 ` [Qemu-devel] [PATCH 06/21] Split nbd block client code Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 07/21] nbd: don't change socket block during negotiate Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 08/21] nbd: pass export name as init argument Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 09/21] nbd: make session_close() idempotent Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 10/21] nbd: finish any pending coroutine Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 11/21] nbd: avoid uninitialized warnings Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 12/21] block: save the associated child name in BlockDriverState Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 13/21] blockdev: add qmp_change_blockdev_int() Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 14/21] block: extract make_snapshot() from bdrv_open() Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 15/21] block: add "snapshot.size" option to avoid extra bdrv_open() Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 16/21] block: learn to open a driver with a given opaque Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 17/21] block: allow to call bdrv_open() with an opaque Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 18/21] block: do not notify change during migration Marc-André Lureau
2013-11-18 12:25 ` [Qemu-devel] [PATCH 19/21] sysemu: add vm_start_hold/release Marc-André Lureau
2013-11-29 10:30 ` Paolo Bonzini
2013-11-18 12:25 ` [Qemu-devel] [PATCH 20/21] spice-core: allow an interface to be in AIO context Marc-André Lureau
2013-11-18 12:53 ` [Qemu-devel] [Spice-devel] " Alon Levy
2013-11-18 12:25 ` [Qemu-devel] [PATCH 21/21] block: add spice block device backend Marc-André Lureau
2013-11-20 11:00 ` Marc-André Lureau
2013-11-22 13:28 ` [Qemu-devel] [PATCH 00/21] RFCv2: add Spice block device Marc-André Lureau
2013-11-29 9:51 ` Gerd Hoffmann
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=528A09E4.5070700@redhat.com \
--to=alevy@redhat.com \
--cc=jcody@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=spice-devel@freedesktop.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).