]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Cleanup boot parameter building
authorMartin Kletzander <mkletzan@redhat.com>
Tue, 18 Sep 2012 09:38:18 +0000 (11:38 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Thu, 20 Sep 2012 08:59:35 +0000 (10:59 +0200)
commit8c952908681ca66ba4be75362de7e593d6c44f94
treec12486135f841cbe7e394dcf225b3c8e0cb2cf5d
parenta5e8beef4fcb8be636136a2127239dceb459995c
qemu: Cleanup boot parameter building

This patch cleans up building the "-boot" parameter and while on that
fixes one inconsistency by modifying these things:

 - I completed the unfinished virDomainBootMenu enum by specifying
   LAST, declaring it and also declaring the TypeFromString and
   TypeToString parameters.
 - Previously mentioned TypeFromString and TypeToString are used when
   parsing the XML.
 - Last, but not least, visible change is that the "-boot" parameter
   is built and parsed properly:
    - The "order=" prefix is used only when additional parameters are
      used (menu, etc.).
    - It's rewritten in a way that other parameters can be added
      easily in the future (used in following patch).
    - The "order=" parameter is properly parsed regardless to where it
      is placed in the string (e.g. "menu=on,order=nc").
    - The "menu=" parameter (and others in the future) are created
      when they should be (i.e. even when bootindex is supported and
      used, but not when bootloader is selected).
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-boot-menu-disable-drive-bootindex.args