[libvirt] [PATCH 3/7] qemu: assume -vnc arg always takes a ':'

Daniel P. Berrange berrange at redhat.com
Fri Nov 6 10:41:15 UTC 2015


On Thu, Nov 05, 2015 at 05:21:39PM -0500, John Ferlan wrote:
> 
> 
> On 11/05/2015 12:33 PM, Daniel P. Berrange wrote:
> > As of QEMU 0.9.0 the -vnc option accepts a ':' to separate port
> > from listen address, so the QEMU driver can assume that support
> > for listen addresses is always available.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> > ---
> >  src/qemu/qemu_capabilities.c                       |   4 -
> >  src/qemu/qemu_capabilities.h                       |   2 +-
> >  src/qemu/qemu_command.c                            | 141 ++++++++++-----------
> >  tests/qemucapabilitiesdata/caps_1.2.2-1.caps       |   1 -
> >  tests/qemucapabilitiesdata/caps_1.3.1-1.caps       |   1 -
> >  tests/qemucapabilitiesdata/caps_1.4.2-1.caps       |   1 -
> >  tests/qemucapabilitiesdata/caps_1.5.3-1.caps       |   1 -
> >  tests/qemucapabilitiesdata/caps_1.6.0-1.caps       |   1 -
> >  tests/qemucapabilitiesdata/caps_1.6.50-1.caps      |   1 -
> >  tests/qemucapabilitiesdata/caps_2.1.1-1.caps       |   1 -
> >  tests/qemucaps2xmldata/all_1.6.0-1.caps            |   1 -
> >  tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps |   1 -
> >  tests/qemuhelptest.c                               |   8 --
> >  tests/qemuxml2argvtest.c                           |   1 -
> >  tests/qemuxml2xmltest.c                            |   1 -
> >  tests/qemuxmlnstest.c                              |   1 -
> >  16 files changed, 68 insertions(+), 99 deletions(-)
> 
> [...]

> > -        if (graphics->data.vnc.sharePolicy) {
> > -            if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY)) {
> > -                virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> > -                               _("vnc display sharing policy is not "
> > -                                 "supported with this QEMU"));
> > +    if (graphics->data.vnc.sharePolicy) {
> > +        if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_VNC_SHARE_POLICY)) {
> > +            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> > +                           _("vnc display sharing policy is not "
> > +                             "supported with this QEMU"));
> >                  goto error;
> 
> This goto error needs to be moved left 4 spaces

Yes.

> 
> > -            }
> > +        }
> >  
> > -            virBufferAsprintf(&opt, ",share=%s",
> > -                              virDomainGraphicsVNCSharePolicyTypeToString(
> > +        virBufferAsprintf(&opt, ",share=%s",
> > +                          virDomainGraphicsVNCSharePolicyTypeToString(
> >                                graphics->data.vnc.sharePolicy));
> 
> This line needs to move left 4 spaces

This doesn't actually. The line above is a fnuction call with opening
round brace, so it is appropriate for the arg on the next line to be
4 spaces indented from that.


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list