From 406c8df3a96414c2c9602081727f0782369de699 Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Wed, 17 Jun 2009 09:05:30 -0400 Subject: Make nic option rom loading less painful. The code how it is today, is totally painful to read and keep. To begin with, the code is duplicated with the option rom loading code that linux_boot and vga are already using. This patch introduces a "bootable" state in NICInfo structure, that we can use to keep track of whether or not a given nic should be bootable, avoiding the introduction of yet another global state. With that in hands, we move the code in vl.c to hw/pc.c, and use the already existing infra structure to load those option roms. Error checking code suggested by Mark McLoughlin Signed-off-by: Glauber Costa Signed-off-by: Anthony Liguori --- net.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net.h') diff --git a/net.h b/net.h index 89e7706be..a9abf6369 100644 --- a/net.h +++ b/net.h @@ -91,6 +91,7 @@ struct NICInfo { VLANState *vlan; void *private; int used; + int bootable; }; extern int nb_nics; @@ -126,6 +127,7 @@ void net_slirp_redir(Monitor *mon, const char *redir_str, const char *redir_opt2 void net_cleanup(void); int slirp_is_inited(void); void net_client_check(void); +void net_set_boot_mask(int boot_mask); void net_host_device_add(Monitor *mon, const char *device, const char *opts); void net_host_device_remove(Monitor *mon, int vlan_id, const char *device); -- cgit v1.2.3-65-gdbad