qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v2 5/5] ne2k_isa: add property for option ro


From: Anthony Liguori
Subject: Re: [Qemu-devel] [RFC PATCH v2 5/5] ne2k_isa: add property for option rom loading.
Date: Wed, 07 Oct 2009 08:08:24 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

Gerd Hoffmann wrote:
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;
+        }
+    }
+

Maybe we should make the filename a property instead of adding a pxe option?

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]