From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org, amit.shah@redhat.com
Cc: armbru@redhat.com, anthony@codemonkey.ws
Subject: [Qemu-devel] [PATCH 1/3] virtio-serial: add virtio_serial_guest_connected
Date: Wed, 28 Nov 2012 11:05:38 +0200 [thread overview]
Message-ID: <1354093540-22583-2-git-send-email-alevy@redhat.com> (raw)
In-Reply-To: <1354093540-22583-1-git-send-email-alevy@redhat.com>
Signed-off-by: Alon Levy <alevy@redhat.com>
---
hw/virtio-serial-bus.c | 9 +++++++++
hw/virtio-serial.h | 5 +++++
2 files changed, 14 insertions(+)
diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c
index ccce1fa..9147497 100644
--- a/hw/virtio-serial-bus.c
+++ b/hw/virtio-serial-bus.c
@@ -290,6 +290,15 @@ ssize_t virtio_serial_write(VirtIOSerialPort *port, const uint8_t *buf,
}
/*
+ * Connectedness of the guest to the port.
+ * Returns 1 for guest connected, 0 for disconnected.
+ */
+int virtio_serial_guest_connected(VirtIOSerialPort *port)
+{
+ return port->guest_connected;
+}
+
+/*
* Readiness of the guest to accept data on a port.
* Returns max. data the guest can receive
*/
diff --git a/hw/virtio-serial.h b/hw/virtio-serial.h
index 16e3982..5012194 100644
--- a/hw/virtio-serial.h
+++ b/hw/virtio-serial.h
@@ -194,6 +194,11 @@ ssize_t virtio_serial_write(VirtIOSerialPort *port, const uint8_t *buf,
size_t size);
/*
+ * Query whether a guest is connected.
+ */
+int virtio_serial_guest_connected(VirtIOSerialPort *port);
+
+/*
* Query whether a guest is ready to receive data.
*/
size_t virtio_serial_guest_ready(VirtIOSerialPort *port);
--
1.8.0
next prev parent reply other threads:[~2012-11-28 9:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-25 13:39 [Qemu-devel] [PATCH] hw/virtio-serial-bus: replay guest open on destination Alon Levy
2012-11-27 12:48 ` Amit Shah
2012-11-27 14:10 ` Markus Armbruster
2012-11-27 14:34 ` Amit Shah
2012-11-27 19:03 ` Anthony Liguori
2012-11-28 9:05 ` [Qemu-devel] [PATCH 0/3] chardev/spice: fix missing spice mouse after migration Alon Levy
2012-11-28 9:05 ` Alon Levy [this message]
2012-11-28 9:05 ` [Qemu-devel] [PATCH 2/3] qemu-char: add qemu_chr_be_connected Alon Levy
2012-11-28 9:42 ` Markus Armbruster
2012-11-28 9:05 ` [Qemu-devel] [PATCH 3/3] spice-qemu-char: register interface on post load Alon Levy
2012-11-28 9:46 ` Markus Armbruster
2012-11-28 9:51 ` Alon Levy
2012-11-28 11:59 ` Markus Armbruster
2012-11-28 12:16 ` Alon Levy
2012-11-29 13:08 ` Amit Shah
2012-12-13 10:54 ` [Qemu-devel] [PATCH 0/3] chardev/spice: fix missing spice mouse after migration Amit Shah
2012-12-13 14:25 ` Anthony Liguori
2012-12-14 4:10 ` Amit Shah
2012-12-23 21:35 ` [Qemu-devel] [PATCH] spice-qemu-char: register interface on post load Alon Levy
2012-12-24 7:39 ` Amit Shah
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=1354093540-22583-2-git-send-email-alevy@redhat.com \
--to=alevy@redhat.com \
--cc=amit.shah@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=armbru@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).