diff options
author | Anton Nefedov <anton.nefedov@virtuozzo.com> | 2017-07-06 15:08:52 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-07-14 11:04:33 +0200 |
commit | 3065070153ef4235659d821c0d6fa28fd0630c57 (patch) | |
tree | fa9b9f1378874f727da8faa466946b6ca5d38f23 /chardev/char-fe.c | |
parent | 7c44a2a9d178118193febd71cfc6943dd21bdde9 (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 'chardev/char-fe.c')
-rw-r--r-- | chardev/char-fe.c | 5 |
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; |