aboutsummaryrefslogtreecommitdiff
path: root/hw/ipmi
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-10-22 12:52:51 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2016-10-24 15:27:20 +0200
commitbecdfa00cfa2995e859ccefa4b7d72a72eb96581 (patch)
tree8973236c181dcde0dbcd9fd36d122fc7a4bac6d7 /hw/ipmi
parentecb672d14f092f481000ac9cd9d7dc0500692eba (diff)
downloadqemu-becdfa00cfa2995e859ccefa4b7d72a72eb96581.zip
qemu-becdfa00cfa2995e859ccefa4b7d72a72eb96581.tar.gz
qemu-becdfa00cfa2995e859ccefa4b7d72a72eb96581.tar.bz2
char: replace PROP_CHR with CharBackend
Store the property in a CharBackend instead of CharDriverState*. This also replace systematically chr by chr.chr to access the CharDriverState*. The following patches will replace it with calls to qemu_chr_fe CharBackend functions. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20161022095318.17775-12-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ipmi')
-rw-r--r--hw/ipmi/ipmi_bmc_extern.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c
index d93e3f3..af9b6f3 100644
--- a/hw/ipmi/ipmi_bmc_extern.c
+++ b/hw/ipmi/ipmi_bmc_extern.c
@@ -62,7 +62,7 @@
typedef struct IPMIBmcExtern {
IPMIBmc parent;
- CharDriverState *chr;
+ CharBackend chr;
bool connected;
@@ -105,7 +105,7 @@ static void continue_send(IPMIBmcExtern *ibe)
goto check_reset;
}
send:
- ret = qemu_chr_fe_write(ibe->chr, ibe->outbuf + ibe->outpos,
+ ret = qemu_chr_fe_write(ibe->chr.chr, ibe->outbuf + ibe->outpos,
ibe->outlen - ibe->outpos);
if (ret > 0) {
ibe->outpos += ret;
@@ -442,12 +442,12 @@ static void ipmi_bmc_extern_realize(DeviceState *dev, Error **errp)
{
IPMIBmcExtern *ibe = IPMI_BMC_EXTERN(dev);
- if (!ibe->chr) {
+ if (!ibe->chr.chr) {
error_setg(errp, "IPMI external bmc requires chardev attribute");
return;
}
- qemu_chr_add_handlers(ibe->chr, can_receive, receive, chr_event, ibe);
+ qemu_chr_add_handlers(ibe->chr.chr, can_receive, receive, chr_event, ibe);
}
static int ipmi_bmc_extern_post_migrate(void *opaque, int version_id)