diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-25 13:37:36 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-01-27 10:50:55 -0600 |
commit | 73093354418602a2ff5e43cb91a21b17fbf047d8 (patch) | |
tree | 3f387f7079e82dde5ff4af7e31935fa5bee9a540 | |
parent | 19b6914a00d3e7be447be418da661d4cd870ee03 (diff) | |
download | qemu-73093354418602a2ff5e43cb91a21b17fbf047d8.zip |
qdev: change ambiguous qdev names
Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/apb_pci.c | 4 | ||||
-rw-r--r-- | hw/dec_pci.c | 2 | ||||
-rw-r--r-- | hw/spapr_pci.c | 2 | ||||
-rw-r--r-- | qom/object.c | 5 |
4 files changed, 9 insertions, 4 deletions
diff --git a/hw/apb_pci.c b/hw/apb_pci.c index 173dab376f..1a45420c56 100644 --- a/hw/apb_pci.c +++ b/hw/apb_pci.c @@ -350,7 +350,7 @@ PCIBus *pci_apb_init(target_phys_addr_t special_base, sysbus_connect_irq(s, i, pic[i]); } - pci_create_simple(d->bus, 0, "pbm"); + pci_create_simple(d->bus, 0, "pbm-pci"); /* APB secondary busses */ pci_dev = pci_create_multifunction(d->bus, PCI_DEVFN(1, 0), true, @@ -448,7 +448,7 @@ static void pbm_pci_host_class_init(ObjectClass *klass, void *data) } static DeviceInfo pbm_pci_host_info = { - .name = "pbm", + .name = "pbm-pci", .size = sizeof(PCIDevice), .class_init = pbm_pci_host_class_init, }; diff --git a/hw/dec_pci.c b/hw/dec_pci.c index f0ecaff07d..333bad98b4 100644 --- a/hw/dec_pci.c +++ b/hw/dec_pci.c @@ -131,7 +131,7 @@ static void pci_dec_21154_device_class_init(ObjectClass *klass, void *data) } static DeviceInfo pci_dec_21154_device_info = { - .name = "dec-21154", + .name = "dec-21154-sysbus", .size = sizeof(DECState), .class_init = pci_dec_21154_device_class_init, }; diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c index b6ac0d4891..2a82eae462 100644 --- a/hw/spapr_pci.c +++ b/hw/spapr_pci.c @@ -222,7 +222,7 @@ static void spapr_main_pci_host_class_init(ObjectClass *klass, void *data) } static DeviceInfo spapr_main_pci_host_info = { - .name = "spapr-pci-host-bridge", + .name = "spapr-pci-host-bridge-pci", .size = sizeof(PCIDevice), .class_init = spapr_main_pci_host_class_init, }; diff --git a/qom/object.c b/qom/object.c index ef37e080d4..a12895fc99 100644 --- a/qom/object.c +++ b/qom/object.c @@ -87,6 +87,11 @@ TypeImpl *type_register(const TypeInfo *info) g_assert(info->name != NULL); + if (type_table_lookup(info->name) != NULL) { + fprintf(stderr, "Registering `%s' which already exists\n", info->name); + abort(); + } + ti->name = g_strdup(info->name); ti->parent = g_strdup(info->parent); |