aboutsummaryrefslogtreecommitdiff
path: root/hw/char/spapr_vty.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/char/spapr_vty.c')
-rw-r--r--hw/char/spapr_vty.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/char/spapr_vty.c b/hw/char/spapr_vty.c
index 7afc6a5094..8d39d40a4d 100644
--- a/hw/char/spapr_vty.c
+++ b/hw/char/spapr_vty.c
@@ -51,7 +51,7 @@ static int vty_getchars(VIOsPAPRDevice *sdev, uint8_t *buf, int max)
buf[n++] = dev->buf[dev->out++ % VTERM_BUFSIZE];
}
- qemu_chr_fe_accept_input(dev->chardev.chr);
+ qemu_chr_fe_accept_input(&dev->chardev);
return n;
}
@@ -62,20 +62,20 @@ void vty_putchars(VIOsPAPRDevice *sdev, uint8_t *buf, int len)
/* XXX this blocks entire thread. Rewrite to use
* qemu_chr_fe_write and background I/O callbacks */
- qemu_chr_fe_write_all(dev->chardev.chr, buf, len);
+ qemu_chr_fe_write_all(&dev->chardev, buf, len);
}
static void spapr_vty_realize(VIOsPAPRDevice *sdev, Error **errp)
{
VIOsPAPRVTYDevice *dev = VIO_SPAPR_VTY_DEVICE(sdev);
- if (!dev->chardev.chr) {
+ if (!qemu_chr_fe_get_driver(&dev->chardev)) {
error_setg(errp, "chardev property not set");
return;
}
- qemu_chr_add_handlers(dev->chardev.chr, vty_can_receive,
- vty_receive, NULL, dev);
+ qemu_chr_fe_set_handlers(&dev->chardev, vty_can_receive,
+ vty_receive, NULL, dev, NULL);
}
/* Forward declaration */