diff options
| author | Anthony Liguori | 2012-01-25 20:37:36 +0100 |
|---|---|---|
| committer | Anthony Liguori | 2012-01-27 17:50:55 +0100 |
| commit | 73093354418602a2ff5e43cb91a21b17fbf047d8 (patch) | |
| tree | 3f387f7079e82dde5ff4af7e31935fa5bee9a540 /qom | |
| parent | virtio-s390: convert to QEMU Object Model (diff) | |
| download | qemu-73093354418602a2ff5e43cb91a21b17fbf047d8.tar.gz qemu-73093354418602a2ff5e43cb91a21b17fbf047d8.tar.xz qemu-73093354418602a2ff5e43cb91a21b17fbf047d8.zip | |
qdev: change ambiguous qdev names
Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qom')
| -rw-r--r-- | qom/object.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |
