Revision a15bb0d6 hw/virtio-console.c
b/hw/virtio-console.c | ||
---|---|---|
76 | 76 |
|
77 | 77 |
static int generic_port_init(VirtConsole *vcon, VirtIOSerialPort *port) |
78 | 78 |
{ |
79 |
VirtIOSerialPortInfo *info = DO_UPCAST(VirtIOSerialPortInfo, qdev, |
|
80 |
vcon->port.dev.info); |
|
81 |
|
|
79 | 82 |
if (vcon->chr) { |
80 | 83 |
qemu_chr_add_handlers(vcon->chr, chr_can_read, chr_read, chr_event, |
81 | 84 |
vcon); |
82 |
vcon->port.info->have_data = flush_buf;
|
|
83 |
vcon->port.info->guest_open = guest_open;
|
|
84 |
vcon->port.info->guest_close = guest_close;
|
|
85 |
info->have_data = flush_buf; |
|
86 |
info->guest_open = guest_open; |
|
87 |
info->guest_close = guest_close; |
|
85 | 88 |
} |
86 | 89 |
return 0; |
87 | 90 |
} |
Also available in: Unified diff