[libvirt] [PATCH] qemu: Use -vga none only if it is supported
Daniel P. Berrange
berrange at redhat.com
Wed Dec 8 16:23:31 UTC 2010
On Wed, Dec 08, 2010 at 04:49:47PM +0100, Jiri Denemark wrote:
> > > @@ -12521,11 +1253,15 @@ static unsigned long long qemudComputeCmdFlags(const char *help,
> > > if (strstr(help, "readonly="))
> > > flags |= QEMUD_CMD_FLAG_DRIVE_READONLY;
> > > }
> > > - if (strstr(help, "-vga") && !strstr(help, "-std-vga")) {
> > > + if ((p = strstr(help, "-vga")) && !strstr(help, "-std-vga")) {
> >
> > I think this can be simplified to work via a single scan, rather than
> > having to do a second scan to filter out the older -std-vga:
> >
> > if ((p = strstr(help, "\n-vga") != NULL) {
>
> Hmm, it's not exactly the same thing. In case there were both "-vga" and
> "-std-vga" present, the new condition would return true while the original
> would fail. I doubt there is a qemu version out there which would provide both
> but to be safe I will leave it as is.
I'm fairly sure there *are* versions of QEMU which report both.
Regards,
Daniel
More information about the libvir-list
mailing list