summaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-26 11:07:58 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-03-27 10:26:49 -0500
commit574b711a92db094a2d4e7ca707f3b34437a64246 (patch)
tree8591fba70cbfceaf375ee22727e65cf71cd5eb5e /qemu-char.c
parent8e25daa87ac98c9070365b42dcfc070e47fca934 (diff)
downloadqemu-574b711a92db094a2d4e7ca707f3b34437a64246.tar.gz
qemu-574b711a92db094a2d4e7ca707f3b34437a64246.tar.bz2
qemu-574b711a92db094a2d4e7ca707f3b34437a64246.zip
qemu-char: Consolidate guest_close/guest_open into a set_fe_open callback
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364292483-16564-7-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-char.c')
-rw-r--r--qemu-char.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 29a24628ed..bab2eb7a9a 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -514,8 +514,7 @@ static CharDriverState *qemu_chr_open_mux(CharDriverState *drv)
chr->chr_update_read_handler = mux_chr_update_read_handler;
chr->chr_accept_input = mux_chr_accept_input;
/* Frontend guest-open / -close notification is not support with muxes */
- chr->chr_guest_open = NULL;
- chr->chr_guest_close = NULL;
+ chr->chr_set_fe_open = NULL;
/* Muxes are always open on creation */
qemu_chr_be_generic_open(chr);
@@ -3425,11 +3424,8 @@ void qemu_chr_fe_set_open(struct CharDriverState *chr, int fe_open)
return;
}
chr->fe_open = fe_open;
- if (fe_open && chr->chr_guest_open) {
- chr->chr_guest_open(chr);
- }
- if (!fe_open && chr->chr_guest_close) {
- chr->chr_guest_close(chr);
+ if (chr->chr_set_fe_open) {
+ chr->chr_set_fe_open(chr, fe_open);
}
}