cli: Fix --boot smbios_mode=sysinfo (bz 1570549)
Not sure how this was expected to work, just make it do the simple thing and set the value in the XML. Add a test case for it
This commit is contained in:
parent
dadc978275
commit
a33ac92040
|
@ -18,6 +18,7 @@
|
|||
<type arch="x86_64">hvm</type>
|
||||
<loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
|
||||
<boot dev="hd"/>
|
||||
<smbios mode="emulate"/>
|
||||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
|
|
|
@ -386,7 +386,7 @@ c.add_compare(""" \
|
|||
--vcpus 4 --cpuset=1,3-5 \
|
||||
--cpu host \
|
||||
--description \"foobar & baz\" \
|
||||
--boot uefi \
|
||||
--boot uefi,smbios_mode=emulate \
|
||||
--security type=dynamic \
|
||||
--security type=none,model=dac \
|
||||
--numatune 1,2,3,5-7,^6 \
|
||||
|
|
|
@ -1626,9 +1626,6 @@ class ParserBoot(VirtCLIParser):
|
|||
inst.set_initargs_string(val)
|
||||
|
||||
def set_smbios_mode_cb(self, inst, val, virtarg):
|
||||
if not val.startswith("emulate") and not val.startswith("host"):
|
||||
inst.sysinfo.parse(val)
|
||||
val = "sysinfo"
|
||||
inst.smbios_mode = val
|
||||
self.optdict["smbios_mode"] = val
|
||||
|
||||
|
@ -1689,8 +1686,7 @@ ParserBoot.add_arg("kernel_args", "kernel_args",
|
|||
ParserBoot.add_arg("init", "init")
|
||||
ParserBoot.add_arg("machine", "machine")
|
||||
ParserBoot.add_arg("initargs", "initargs", cb=ParserBoot.set_initargs_cb)
|
||||
ParserBoot.add_arg("smbios_mode", "smbios_mode",
|
||||
can_comma=True, cb=ParserBoot.set_smbios_mode_cb)
|
||||
ParserBoot.add_arg("smbios_mode", "smbios_mode")
|
||||
|
||||
# This is simply so the boot options are advertised with --boot help,
|
||||
# actual processing is handled by _parse
|
||||
|
|
Loading…
Reference in New Issue