aboutsummaryrefslogtreecommitdiff
path: root/chardev/char-fe.c
diff options
context:
space:
mode:
Diffstat (limited to 'chardev/char-fe.c')
-rw-r--r--chardev/char-fe.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/chardev/char-fe.c b/chardev/char-fe.c
index de5ba3c119..f3af6ae584 100644
--- a/chardev/char-fe.c
+++ b/chardev/char-fe.c
@@ -189,6 +189,11 @@ bool qemu_chr_fe_backend_connected(CharBackend *be)
return !!be->chr;
}
+bool qemu_chr_fe_backend_open(CharBackend *be)
+{
+ return be->chr && be->chr->be_open;
+}
+
bool qemu_chr_fe_init(CharBackend *b, Chardev *s, Error **errp)
{
int tag = 0;