summaryrefslogtreecommitdiffstats
path: root/linux-user/syscall_types.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2010-06-08 13:54:04 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2010-06-14 15:46:28 -0500
commit1bb650420021ced718d550559034a5147c053068 (patch)
treebc7f31c113461766e164bc5737f5f4f7e09e9abd /linux-user/syscall_types.h
parent3709c1b7ccad238e129c219c0081f1d55330e900 (diff)
downloadhqemu-1bb650420021ced718d550559034a5147c053068.zip
hqemu-1bb650420021ced718d550559034a5147c053068.tar.gz
qdev: Revert the hack to let -net nic and pci_add set qdev ID
Setting the ID in pci_nic_init() is a blatant violation of the DeviceState abstraction. Which even carries a comment advising against this: /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ What's worse, it bypasses the code ensuring unique qdev IDs: "-device virtio-net-pci,id=foo -net nic,id=foo -net nic,name=foo" happily creates three qdevs with ID "foo". That's because qdev relies on qemu_opts_create() to ensure unique IDs, but -net nic uses a different QemuOptsList, which means id is in a different namespace. And its name is not checked for uniqueness at all. -net nic and pci_add are legacy. Use -device and device_add if you want a NIC with a qdev ID. This reverts what's still left of commit eb54b6dc "qdev: add id= support for pci nics." Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'linux-user/syscall_types.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud