From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QjzjJ-0007yV-Nc for garchives@archives.gentoo.org; Thu, 21 Jul 2011 20:20:24 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AB40B21C41D; Thu, 21 Jul 2011 20:19:49 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 7F08821C41D for ; Thu, 21 Jul 2011 20:19:49 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 37BA91B4014 for ; Thu, 21 Jul 2011 20:19:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9DEC980048 for ; Thu, 21 Jul 2011 20:19:48 +0000 (UTC) From: "Doug Goldstein" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Doug Goldstein" Message-ID: <7525703fbbae309f4e1a745934530ae3d21834aa.cardoe@gentoo> Subject: [gentoo-commits] proj/qemu-kvm:qemu-kvm-0.14.1-gentoo commit in: / X-VCS-Repository: proj/qemu-kvm X-VCS-Files: spice-qemu-char.c X-VCS-Directories: / X-VCS-Committer: cardoe X-VCS-Committer-Name: Doug Goldstein X-VCS-Revision: 7525703fbbae309f4e1a745934530ae3d21834aa Date: Thu, 21 Jul 2011 20:19:48 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 46934a84628652703d8f07b44fa546ce commit: 7525703fbbae309f4e1a745934530ae3d21834aa Author: Hans de Goede redhat com> AuthorDate: Fri Mar 18 14:35:27 2011 +0000 Commit: Doug Goldstein gentoo org> CommitDate: Thu Jul 21 20:18:53 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qemu-kvm.git;= a=3Dcommit;h=3D7525703f spice-chardev: listen to frontend guest open / close Note the vmc_register_interface() in spice_chr_write is left in place in case someone uses spice-chardev with a frontend which does not have guest open / close notification. Signed-off-by: Hans de Goede redhat.com> --- spice-qemu-char.c | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index ed7851e..343146c 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -155,6 +155,18 @@ static void spice_chr_close(struct CharDriverState *= chr) qemu_free(s); } =20 +static void spice_chr_guest_open(struct CharDriverState *chr) +{ + SpiceCharDriver *s =3D chr->opaque; + vmc_register_interface(s); +} + +static void spice_chr_guest_close(struct CharDriverState *chr) +{ + SpiceCharDriver *s =3D chr->opaque; + vmc_unregister_interface(s); +} + static void print_allowed_subtypes(void) { const char** psubtype; @@ -207,6 +219,8 @@ CharDriverState *qemu_chr_open_spice(QemuOpts *opts) chr->opaque =3D s; chr->chr_write =3D spice_chr_write; chr->chr_close =3D spice_chr_close; + chr->chr_guest_open =3D spice_chr_guest_open; + chr->chr_guest_close =3D spice_chr_guest_close; s->unblock_timer =3D qemu_new_timer(vm_clock, spice_chr_unblock, s); =20 qemu_chr_generic_open(chr);