All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Fergeau <cfergeau@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	qemu-devel@nongnu.org, "Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] spice: Disallow use of gl + TCP port
Date: Tue, 15 Mar 2016 10:49:55 +0100	[thread overview]
Message-ID: <20160315094955.GD1546@edamame.cdg.redhat.com> (raw)
In-Reply-To: <56E6DBAE.1060408@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

On Mon, Mar 14, 2016 at 09:41:34AM -0600, Eric Blake wrote:
> On 03/14/2016 05:41 AM, Christophe Fergeau wrote:
> > Currently, virgl support has to go through a local unix socket, trying
> > to connect to a VM using -spice gl through spice://localhost:5900 will
> > only result in a black screen.
> > This commit errors out when the user tries to start a VM with both GL
> > support and a port/tls-port set.
> > This would fit better in spice-server, but currently QEMU does not call
> > into spice-server when parsing 'gl' on its command line, so we have to
> > do this check in QEMU instead.
> > 
> > Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
> > ---
> >  ui/spice-core.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/ui/spice-core.c b/ui/spice-core.c
> > index 7987a4e..94f3236 100644
> > --- a/ui/spice-core.c
> > +++ b/ui/spice-core.c
> > @@ -844,6 +844,10 @@ void qemu_spice_init(void)
> >  
> >  #ifdef HAVE_SPICE_GL
> >      if (qemu_opt_get_bool(opts, "gl", 0)) {
> > +        if ((port != 0) || (tls_port != 0)) {
> 
> Overparenthesized; you could write:
> 
> if (port || tls_port) {
> 
> for the same effect with less typing.

Yeah I know I'm overly verbose with these tests, the parentheses make it
explicit that there are no operator priority issues, the != 0 emphasize
it's an integer type which is being handled.

I'll change it to your recommendation before sending a v2.

Christophe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-03-15  9:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 11:41 [Qemu-devel] [PATCH] spice: Disallow use of gl + TCP port Christophe Fergeau
2016-03-14 13:34 ` Marc-André Lureau
2016-03-14 15:00 ` Gerd Hoffmann
2016-03-14 15:16   ` Christophe Fergeau
2016-03-15 13:09     ` Gerd Hoffmann
2016-03-15 14:17       ` Christophe Fergeau
2016-03-15 14:32         ` Gerd Hoffmann
2016-03-16  9:10           ` Christophe Fergeau
2016-03-14 15:41 ` Eric Blake
2016-03-15  9:49   ` Christophe Fergeau [this message]
2016-03-18  8:17 ` Gerd Hoffmann
2016-03-18  9:07   ` Christophe Fergeau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160315094955.GD1546@edamame.cdg.redhat.com \
    --to=cfergeau@redhat.com \
    --cc=eblake@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.