Re: [PATCH] qemu: Error on unsupported graphics config

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 26, 2010 at 04:31:21PM -0400, Cole Robinson wrote:
> Throw an explicit error if multiple graphics devices are specified, or
> an unsupported type is specified (rdp).
> 
> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  src/qemu/qemu_conf.c |   12 ++++++++++++
>  1 files changed, 12 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 0dbab48..05ad67d 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -4542,6 +4542,12 @@ int qemudBuildCommandLine(virConnectPtr conn,
>          }
>      }
>  
> +    if (def->ngraphics > 1) {
> +        qemuReportError(VIR_ERR_INTERNAL_ERROR,
> +                        "%s", _("only 1 graphics device is supported"));
> +        goto error;
> +    }
> +
>      if ((def->ngraphics == 1) &&
>          def->graphics[0]->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {
>          virBuffer opt = VIR_BUFFER_INITIALIZER;
> @@ -4641,6 +4647,12 @@ int qemudBuildCommandLine(virConnectPtr conn,
>           * default, since the default changes :-( */
>          if (qemuCmdFlags & QEMUD_CMD_FLAG_SDL)
>              ADD_ARG_LIT("-sdl");
> +
> +    } else if ((def->ngraphics == 1)) {
> +        qemuReportError(VIR_ERR_INTERNAL_ERROR,
> +                    _("unsupported graphics type '%s'"),
> +                    virDomainGraphicsTypeToString(def->graphics[0]->type));
> +        goto error;
>      }
>  
>      if (def->nvideos) {

ACK

Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]