Revision 98b19252 hw/qdev.c
b/hw/qdev.c | ||
---|---|---|
321 | 321 |
CharDriverState *qdev_init_chardev(DeviceState *dev) |
322 | 322 |
{ |
323 | 323 |
static int next_serial; |
324 |
static int next_virtconsole; |
|
325 |
/* FIXME: This is a nasty hack that needs to go away. */ |
|
326 |
if (strncmp(dev->info->name, "virtio", 6) == 0) { |
|
327 |
return virtcon_hds[next_virtconsole++]; |
|
328 |
} else { |
|
329 |
return serial_hds[next_serial++]; |
|
330 |
} |
|
324 |
|
|
325 |
/* FIXME: This function needs to go away: use chardev properties! */ |
|
326 |
return serial_hds[next_serial++]; |
|
331 | 327 |
} |
332 | 328 |
|
333 | 329 |
BusState *qdev_get_parent_bus(DeviceState *dev) |
Also available in: Unified diff