diff mbox

[RfC,v3,10/10] ne2k_pci: load rom.

Message ID 1255700523-15270-11-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Oct. 16, 2009, 1:42 p.m. UTC
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/ne2000.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/hw/ne2000.c b/hw/ne2000.c
index f296b10..6cb5f58 100644
--- a/hw/ne2000.c
+++ b/hw/ne2000.c
@@ -25,6 +25,7 @@ 
 #include "pci.h"
 #include "net.h"
 #include "ne2000.h"
+#include "loader.h"
 
 /* debug NE2000 card */
 //#define DEBUG_NE2000
@@ -767,6 +768,14 @@  static int pci_ne2000_init(PCIDevice *pci_dev)
                                  ne2000_cleanup, s);
     qemu_format_nic_info_str(s->vc, s->c.macaddr.a);
 
+    if (!pci_dev->qdev.hotplugged) {
+        static int loaded = 0;
+        if (!loaded) {
+            rom_add_option("pxe-ne2k_pci.bin");
+            loaded = 1;
+        }
+    }
+
     register_savevm("ne2000", -1, 3, pci_ne2000_save, pci_ne2000_load, d);
     return 0;
 }