virtio-console: Fix VIRTIO_CONSOLE() cast macro
Commit 0399a381 (virtio-console: QOM cast cleanup for VirtConsole) broke virtserialport since it shares functions and state struct with virtconsole. Let virtconsole inherit from virtserialport, and use virtserialport type for casting. Note that virtio-serial-port is the abstract base type in virtio-serial-bus.c, whereas virtserialport is the user-instantiatable type in virtio-console.c. Therefore using TYPE_VIRTIO_CONSOLE_SERIAL_PORT. Reported-by: NRichard W.M. Jones <rjones@redhat.com> Acked-by: NRichard W.M. Jones <rjones@redhat.com> Signed-off-by: NAndreas Färber <afaerber@suse.de>
Showing
想要评论请 注册 或 登录