mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Add a option for enabling ne2000 NIC device model
Signed-off-by: Yan Li <yanx.li@intel.com> Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com> Signed-off-by: Edwin Zhai <edwin.zhai@intel.com>
This commit is contained in:
1 parent
dc8499433a
commit
98adab9284
6 files changed
+23
-13
No files matched your search
@@ -257,7 +257,7 @@ class VmxImageHandler(ImageHandler):
|
||||
# Return a list of cmd line args to the device models based on the
|
||||
# xm config file
|
||||
def parseDeviceModelArgs(self, imageConfig, deviceConfig):
|
||||
dmargs = [ 'cdrom', 'boot', 'fda', 'fdb',
|
||||
dmargs = [ 'cdrom', 'boot', 'fda', 'fdb', 'ne2000',
|
||||
'localtime', 'serial', 'stdvga', 'isa', 'vcpus' ]
|
||||
ret = []
|
||||
for a in dmargs:
|
||||
@@ -265,9 +265,10 @@ class VmxImageHandler(ImageHandler):
|
||||
|
||||
# python doesn't allow '-' in variable names
|
||||
if a == 'stdvga': a = 'std-vga'
|
||||
if a == 'ne2000': a = 'nic-ne2000'
|
||||
|
||||
# Handle booleans gracefully
|
||||
if a in ['localtime', 'std-vga', 'isa']:
|
||||
if a in ['localtime', 'std-vga', 'isa', 'nic-ne2000']:
|
||||
if v != None: v = int(v)
|
||||
|
||||
log.debug("args: %s, val: %s" % (a,v))
|
||||
|
||||
@@ -364,6 +364,10 @@ gopts.var('nographic', val='no|yes',
|
||||
fn=set_bool, default=0,
|
||||
use="Should device models use graphics?")
|
||||
|
||||
gopts.var('ne2000', val='no|yes',
|
||||
fn=set_bool, default=0,
|
||||
use="Should device models use ne2000?")
|
||||
|
||||
gopts.var('vnc', val='',
|
||||
fn=set_value, default=None,
|
||||
use="""Should the device model use VNC?""")
|
||||
@@ -540,7 +544,7 @@ def configure_vmx(opts, config_image, vals):
|
||||
"""
|
||||
args = [ 'memmap', 'device_model', 'vcpus', 'cdrom',
|
||||
'boot', 'fda', 'fdb', 'localtime', 'serial', 'macaddr', 'stdvga',
|
||||
'isa', 'nographic', 'vnc', 'vncviewer', 'sdl', 'display']
|
||||
'isa', 'nographic', 'vnc', 'vncviewer', 'sdl', 'display', 'ne2000']
|
||||
for a in args:
|
||||
if (vals.__dict__[a]):
|
||||
config_image.append([a, vals.__dict__[a]])
|
||||
|
||||