summaryrefslogtreecommitdiff
path: root/include/chardev
diff options
context:
space:
mode:
authorAnton Nefedov <anton.nefedov@virtuozzo.com>2017-07-06 15:08:52 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2017-07-14 11:04:33 +0200
commit3065070153ef4235659d821c0d6fa28fd0630c57 (patch)
treefa9b9f1378874f727da8faa466946b6ca5d38f23 /include/chardev
parent7c44a2a9d178118193febd71cfc6943dd21bdde9 (diff)
char: avoid chardevice direct access
frontends should avoid accessing CharDriver struct where possible Signed-off-by: Anton Nefedov <anton.nefedov@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <1499342940-56739-6-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/chardev')
-rw-r--r--include/chardev/char-fe.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
index 588abed606..71cd069478 100644
--- a/include/chardev/char-fe.h
+++ b/include/chardev/char-fe.h
@@ -60,6 +60,13 @@ Chardev *qemu_chr_fe_get_driver(CharBackend *be);
bool qemu_chr_fe_backend_connected(CharBackend *be);
/**
+ * @qemu_chr_fe_backend_open:
+ *
+ * Returns true if chardevice associated with @be is open.
+ */
+bool qemu_chr_fe_backend_open(CharBackend *be);
+
+/**
* @qemu_chr_fe_set_handlers:
* @b: a CharBackend
* @fd_can_read: callback to get the amount of data the frontend may