Moving option rom loading from machine init to the (nic) drivers.
Signed-off-by: Gerd Hoffmann <address@hidden>
---
hw/ne2000-isa.c | 9 +++++++++
hw/ne2000.h | 1 +
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/hw/ne2000-isa.c b/hw/ne2000-isa.c
index 7a24088..1d296a0 100644
--- a/hw/ne2000-isa.c
+++ b/hw/ne2000-isa.c
@@ -27,6 +27,7 @@
#include "qdev.h"
#include "net.h"
#include "ne2000.h"
+#include "loader.h"
typedef struct ISANE2000State {
ISADevice dev;
@@ -78,6 +79,13 @@ static int isa_ne2000_initfn(ISADevice *dev)
qemu_error("warning: no vlan specfied, ne2k_isa is unconnected\n");
}
+ if (s->pxe) {
+ if (rom_add_option("pxe-ne2k_isa.bin") != 0) {
+ qemu_error("warning: loading rom pxe-ne2k_isa.bin failed\n");
+ s->pxe = 0;
+ }
+ }
+