Revision 07caea31
ID | 07caea315a85ebfe90851f9c2e4ef3fdd24117b5 |
Fix pci_add nic not to exit on bad model
Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() to
create the NIC. When MODEL is unknown or "?", this prints to stderr
and terminates the program.
Change pci_nic_init() not to treat "?" specially, and to return NULL
on failure. Switch uses during startup to new convenience wrapper
pci_nic_init_nofail(), which behaves just like pci_nic_init() used to
do.
Bonus bug fix: we now check for qdev_init() failing there.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Files
- added
- modified
- copied
- renamed
- deleted
- hw
- mips_malta.c (diff)
- pc.c (diff)
- pci.c (diff)
- pci.h (diff)
- ppc440_bamboo.c (diff)
- ppc_newworld.c (diff)
- ppc_oldworld.c (diff)
- ppc_prep.c (diff)
- ppce500_mpc8544ds.c (diff)
- r2d.c (diff)
- realview.c (diff)
- sun4u.c (diff)
- versatilepb.c (diff)
- net.c (diff)
- net.h (diff)