Skip to content
  • Markus Armbruster's avatar
    Fix pci_add nic not to exit on bad model · 07caea31
    Markus Armbruster authored
    
    
    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: default avatarMarkus Armbruster <armbru@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    07caea31