Re: [Qemu-devel] [PATCH 10/30] qdev: don't access name through info

2012-01-03 Thread Paolo Bonzini
On 01/03/2012 01:51 AM, Anthony Liguori wrote: d-nic = qemu_new_nic(net_e1000_info,d-conf, - qdev_get_info(d-dev.qdev)-name, d-dev.qdev.id, d); + object_get_typename(OBJECT(d)), d-dev.qdev.id, d); It's a pity that this loses type-safety.

Re: [Qemu-devel] [PATCH 10/30] qdev: don't access name through info

2012-01-03 Thread Anthony Liguori
On 01/03/2012 03:06 AM, Paolo Bonzini wrote: On 01/03/2012 01:51 AM, Anthony Liguori wrote: d-nic = qemu_new_nic(net_e1000_info,d-conf, - qdev_get_info(d-dev.qdev)-name, d-dev.qdev.id, d); + object_get_typename(OBJECT(d)), d-dev.qdev.id, d); It's a pity that this loses type-safety. You mean

Re: [Qemu-devel] [PATCH 10/30] qdev: don't access name through info

2012-01-03 Thread Paolo Bonzini
On 01/03/2012 02:39 PM, Anthony Liguori wrote: It's a pity that this loses type-safety. You mean at run time or because OBJECT() cast is so lose? We can fix the later.. At compile-time, i.e. the latter. But no problem, I really think it should be fixed in the compiler. Paolo

[Qemu-devel] [PATCH 10/30] qdev: don't access name through info

2012-01-02 Thread Anthony Liguori
We already have a QOM interface for this so let's use it. Signed-off-by: Anthony Liguori aligu...@us.ibm.com --- hw/e1000.c |2 +- hw/eepro100.c |2 +- hw/etraxfs_eth.c|2 +- hw/hda-audio.c |2 +- hw/intel-hda.c |2 +-