Signed-off-by: Anthony Liguori <aligu...@us.ibm.com> --- 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