On Tue, Jul 07, 2009 at 11:15:15PM +0100, Daniel P. Berrange wrote:
> This patch extends the QEMU driver to support the <video> element
> for configuring the type of video adapter exposed to the guest.
>
> It implements the XML -> ARGV and ARGV -> XML conversions, so both
> import & export work. Some of the existing tests are updated to
> use the <video> element to get test coverage. The QEMU help parsing
> test is changed to use symbolic constants instead of black magic
> hex constants. This supports both old -std-vga and new -vga style
> QEMU args.
[...]
> + if (def->nvideos) {
> + if (def->nvideos > 1) {
> + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> + "%s", _("only one video card is currentely
> supported"));
> + goto error;
> + }
> +
> + if (qemuCmdFlags & QEMUD_CMD_FLAG_VGA) {
> + if (def->videos[0]->type == VIR_DOMAIN_VIDEO_TYPE_XEN) {
> + /* nothing - vga has no effect on Xen pvfb */
> + } else {
> + const char *vgastr =
> qemuVideoTypeToString(def->videos[0]->type);
> + if (!vgastr) {
> + qemudReportError(conn, NULL, NULL,
> VIR_ERR_INTERNAL_ERROR,
> + _("video type %s is not supported with
> QEMU"),
> +
> virDomainVideoTypeToString(def->videos[0]->type));
> + goto error;
> + }
[...]
> + default:
> + qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
> + _("video type %s is not supported with
> QEMU"),
> +
> virDomainVideoTypeToString(def->videos[0]->type));
It would be a bit nicer to catch those at define time, but that would
imply duplicating code.
ACK,
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
[email protected] | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list