aboutsummaryrefslogtreecommitdiff
path: root/net.h
diff options
context:
space:
mode:
authorGlauber Costa <glommer@redhat.com>2009-06-17 09:05:30 -0400
committerAnthony Liguori <aliguori@us.ibm.com>2009-06-22 10:10:50 -0500
commit406c8df3a96414c2c9602081727f0782369de699 (patch)
treed663a28ff170b87622a1f1aa51305cd4e2e2ebb9 /net.h
parent4a24470497360d8b77568b83008d0e9d6eb0787d (diff)
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 <glommer@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net.h')
-rw-r--r--net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net.h b/net.h
index 89e7706be4..a9abf63695 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);