From d271de9f1bd7c4671af8cc8edca4ac677371cfff Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 15 Jul 2009 13:59:24 +0200 Subject: qdev: create default bus names. Create a default bus name if none is passed to qbus_create(). If the parent device has DeviceState->id set it will be used to create the bus name,. i.e. -device lsi,id=foo will give you a scsi bus named "foo.0". If there is no id BusInfo->name (lowercased) will be used instead, i.e. -device lsi will give you a scsi bus named "scsi.0". A scsi adapter with two scsi busses would have "scsi.0" and "scsi.1" or "$id.0" and "$id.1" busses. The numbers of the child busses are per device, i.e. when adding two lsi adapters both will have a "*.0" child bus. Signed-off-by: Gerd Hoffmann Signed-off-by: Anthony Liguori --- hw/qdev.h | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/qdev.h') diff --git a/hw/qdev.h b/hw/qdev.h index dfd3e92ab0..d9c78eba60 100644 --- a/hw/qdev.h +++ b/hw/qdev.h @@ -27,6 +27,7 @@ struct DeviceState { int num_gpio_in; qemu_irq *gpio_in; LIST_HEAD(, BusState) child_bus; + int num_child_bus; NICInfo *nd; LIST_ENTRY(DeviceState) sibling; }; -- cgit v1.2.3-55-g7522