diff options
author | Glauber Costa <glommer@redhat.com> | 2009-06-17 09:05:30 -0400 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2009-06-22 10:10:50 -0500 |
commit | 406c8df3a96414c2c9602081727f0782369de699 (patch) | |
tree | d663a28ff170b87622a1f1aa51305cd4e2e2ebb9 /net.h | |
parent | Disable _FORTIFY_SOURCE to fix Ubuntu build with -Werror (diff) | |
download | qemu-kvm-406c8df3a96414c2c9602081727f0782369de699.tar.gz qemu-kvm-406c8df3a96414c2c9602081727f0782369de699.tar.bz2 qemu-kvm-406c8df3a96414c2c9602081727f0782369de699.zip |
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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); |