diff options
author | Markus Armbruster <armbru@redhat.com> | 2009-09-25 03:53:51 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-10-05 09:32:53 -0500 |
commit | 07caea315a85ebfe90851f9c2e4ef3fdd24117b5 (patch) | |
tree | 153e42950d500a7c6219539941ff7c1f81a6487b /hw/ppc440_bamboo.c | |
parent | 9ee05825d9eaf7fe3aaed5ed04b83612ede704a0 (diff) | |
download | qemu-07caea315a85ebfe90851f9c2e4ef3fdd24117b5.zip qemu-07caea315a85ebfe90851f9c2e4ef3fdd24117b5.tar.gz qemu-07caea315a85ebfe90851f9c2e4ef3fdd24117b5.tar.bz2 |
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>
Diffstat (limited to 'hw/ppc440_bamboo.c')
-rw-r--r-- | hw/ppc440_bamboo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index 8a6b7ce..a488240 100644 --- a/hw/ppc440_bamboo.c +++ b/hw/ppc440_bamboo.c @@ -119,7 +119,7 @@ static void bamboo_init(ram_addr_t ram_size, for (i = 0; i < nb_nics; i++) { /* There are no PCI NICs on the Bamboo board, but there are * PCI slots, so we can pick whatever default model we want. */ - pci_nic_init(&nd_table[i], "e1000", NULL); + pci_nic_init_nofail(&nd_table[i], "e1000", NULL); } } |