aboutsummaryrefslogtreecommitdiff
path: root/hw/ipmi/ipmi_bmc_extern.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ipmi/ipmi_bmc_extern.c')
-rw-r--r--hw/ipmi/ipmi_bmc_extern.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
index af9b6f379b..5530870d1a 100644
--- a/hw/ipmi/ipmi_bmc_extern.c
+++ b/hw/ipmi/ipmi_bmc_extern.c
@@ -105,7 +105,7 @@ static void continue_send(IPMIBmcExtern *ibe)
goto check_reset;
}
send:
- ret = qemu_chr_fe_write(ibe->chr.chr, ibe->outbuf + ibe->outpos,
+ ret = qemu_chr_fe_write(&ibe->chr, ibe->outbuf + ibe->outpos,
ibe->outlen - ibe->outpos);
if (ret > 0) {
ibe->outpos += ret;
@@ -442,12 +442,13 @@ static void ipmi_bmc_extern_realize(DeviceState *dev, Error **errp)
{
IPMIBmcExtern *ibe = IPMI_BMC_EXTERN(dev);
- if (!ibe->chr.chr) {
+ if (!qemu_chr_fe_get_driver(&ibe->chr)) {
error_setg(errp, "IPMI external bmc requires chardev attribute");
return;
}
- qemu_chr_add_handlers(ibe->chr.chr, can_receive, receive, chr_event, ibe);
+ qemu_chr_fe_set_handlers(&ibe->chr, can_receive, receive,
+ chr_event, ibe, NULL);
}
static int ipmi_bmc_extern_post_migrate(void *opaque, int version_id)