[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/14] qdev: enforce that no devices overload the id
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 02/14] qdev: enforce that no devices overload the id property |
Date: |
Fri, 16 Sep 2011 11:00:22 -0500 |
Signed-off-by: Anthony Liguori <address@hidden>
---
hw/qdev.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index a223d41..0e267a7 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -47,9 +47,17 @@ static BusState *qbus_find(const char *path);
/* Register a new device type. */
void qdev_register(DeviceInfo *info)
{
+ int i;
+
assert(info->size >= sizeof(DeviceState));
assert(!info->next);
+ if (info->props) {
+ for (i = 0; info->props[i].name; i++) {
+ g_assert_cmpstr(info->props[i].name, !=, "id");
+ }
+ }
+
info->next = device_info_list;
device_info_list = info;
}
--
1.7.4.1
- [Qemu-devel] [PATCH 00/14] qdev: assign unique names to all devices (part 1), Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 05/14] qdev: remove opts pointer tracking, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 01/14] apic: rename apic.id -> apic.index, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 13/14] ide: give IDE drives a default name in qdev, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 12/14] pci: give pci devices a default name., Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 09/14] fw_cfg: add name to global fw_cfg device, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 03/14] qdev: push id into qdev_create calls, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 02/14] qdev: enforce that no devices overload the id property,
Anthony Liguori <=
- [Qemu-devel] [PATCH 08/14] sysbus: make create_varargs take an id, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 14/14] pc: assign names to machine created devices, Anthony Liguori, 2011/09/16
- [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Anthony Liguori, 2011/09/16
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Gerd Hoffmann, 2011/09/19
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Anthony Liguori, 2011/09/19
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Gerd Hoffmann, 2011/09/20
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Anthony Liguori, 2011/09/20
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Gerd Hoffmann, 2011/09/20
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Anthony Liguori, 2011/09/20
- Re: [Qemu-devel] [PATCH 04/14] qdev: take ownership of id pointer, Gerd Hoffmann, 2011/09/20