[libvirt] [PATCH 3/3] qemu: add support for splash-timeout

Ján Tomko jtomko at redhat.com
Mon Aug 25 11:51:18 UTC 2014


On 08/22/2014 05:10 PM, Martin Kletzander wrote:
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1021703
> 
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---
>  src/qemu/qemu_command.c                                   | 15 +++++++++++++++
>  .../qemuxml2argv-boot-menu-enable-with-timeout.args       | 15 +++++++++++++++
>  tests/qemuxml2argvtest.c                                  |  4 ++++
>  3 files changed, 34 insertions(+)
>  create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-boot-menu-enable-with-timeout.args
> 
> diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
> index 0d7b12d..bb1c423 100644
> --- a/src/qemu/qemu_command.c
> +++ b/src/qemu/qemu_command.c
> @@ -7927,6 +7927,21 @@ qemuBuildCommandLine(virConnectPtr conn,
>                                def->os.bios.rt_delay);
>          }
> 
> +        if (def->os.bm_timeout_set) {
> +            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_SPLASH_TIMEOUT)) {
> +                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                               _("splash timeout is not supported "
> +                                 "by this QEMU binary"));
> +                virBufferFreeAndReset(&boot_buf);
> +                goto error;
> +            }
> +
> +            if (boot_nparams++)
> +                virBufferAddChar(&boot_buf, ',');
> +
> +            virBufferAsprintf(&boot_buf, "splash-time=%d", def->os.bm_timeout);

This should be %u for usigned int.

Also, it would be nice to get rid of 'boot_nparams', but that's out of scope
of this patch.

ACK series

Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140825/777e3ef2/attachment-0001.sig>


More information about the libvir-list mailing list