[libvirt] [PATCH v2 3/4] qemu: Adapt to UEFI and NVRAM store file format change
Laszlo Ersek
lersek at redhat.com
Tue Jan 13 19:59:04 UTC 2015
On 01/13/15 18:20, Michal Privoznik wrote:
> This basically implements the availability of choosing
> UEFI and NVRAM store file format in the qemu driver.
>
> Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> ---
> src/qemu/qemu_command.c | 12 ++++---
> .../qemuxml2argv-bios-nvram-qcow2.args | 10 ++++++
> .../qemuxml2argv-bios-nvram-qcow2.xml | 40 ++++++++++++++++++++++
> tests/qemuxml2argvtest.c | 2 ++
> 4 files changed, 60 insertions(+), 4 deletions(-)
> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.args
> create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-bios-nvram-qcow2.xml
>
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 3346e95..44fa331 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -7686,8 +7686,10 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
> }
>
> virBufferAsprintf(&buf,
> - "file=%s,if=pflash,format=raw,unit=%d",
> - loader->path, unit);
> + "file=%s,if=pflash,format=%s,unit=%d",
> + loader->path,
> + virDomainLoaderFormatTypeToString(loader->format),
> + unit);
> unit++;
>
> if (loader->readonly) {
> @@ -7708,8 +7710,10 @@ qemuBuildDomainLoaderCommandLine(virCommandPtr cmd,
> if (loader->nvram) {
> virBufferFreeAndReset(&buf);
> virBufferAsprintf(&buf,
> - "file=%s,if=pflash,format=raw,unit=%d",
> - loader->nvram, unit);
> + "file=%s,if=pflash,format=%s,unit=%d",
> + loader->nvram,
> + virDomainLoaderFormatTypeToString(loader->nvramFormat),
> + unit);
>
> virCommandAddArg(cmd, "-drive");
> virCommandAddArgBuffer(cmd, &buf);
Acked-by: Laszlo Ersek <lersek at redhat.com>
Thanks
Laszlo
More information about the libvir-list
mailing list