aboutsummaryrefslogtreecommitdiff
path: root/net.h
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2009-09-25 03:53:50 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2009-10-05 09:32:53 -0500
commit9ee05825d9eaf7fe3aaed5ed04b83612ede704a0 (patch)
tree26308c0eb957d23a488e5c5ceeb5e23647a6ae1d /net.h
parent49bd1458da8909434eb83c5cda472c63ff6a529c (diff)
Make it obvious that pci_nic_init() can't fail
Before this patch, pci_nic_init() returns NULL when it can't find the model in pci_nic_models[]. Except this can't happen, because qemu_check_nic_model_list() just searched for model in pci_nic_models[], and terminated the program on failure. Repeating the search here is pointless. Instead, change qemu_check_nic_model_list() to return the model's array index. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.h')
-rw-r--r--net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/net.h b/net.h
index 147982659e..c93cc99700 100644
--- a/net.h
+++ b/net.h
@@ -76,8 +76,8 @@ void qemu_purge_queued_packets(VLANClientState *vc);
void qemu_flush_queued_packets(VLANClientState *vc);
void qemu_format_nic_info_str(VLANClientState *vc, uint8_t macaddr[6]);
void qemu_check_nic_model(NICInfo *nd, const char *model);
-void qemu_check_nic_model_list(NICInfo *nd, const char * const *models,
- const char *default_model);
+int qemu_check_nic_model_list(NICInfo *nd, const char * const *models,
+ const char *default_model);
void qemu_handler_true(void *opaque);
void do_info_network(Monitor *mon);