[libvirt] [libvirt-designer PATCHv3 7/9] Implement gvir_designer_domain_add_usb_redir()

Christophe Fergeau cfergeau at redhat.com
Wed Jun 5 11:32:32 UTC 2013


On Tue, Jun 04, 2013 at 07:11:05PM +0200, Michal Privoznik wrote:
> > 
> > diff --git a/examples/virtxml.c b/examples/virtxml.c
> > index 46fb551..bd3bfb3 100644
> > --- a/examples/virtxml.c
> > +++ b/examples/virtxml.c
> > @@ -566,6 +566,7 @@ main(int argc, char *argv[])
> >      static char *resources_str = NULL;
> >      GVirDesignerDomainResources resources;
> >      GOptionContext *context = NULL;
> > +    unsigned int i;
> >  
> >      static GOptionEntry entries[] =
> >      {
> > @@ -645,6 +646,10 @@ main(int argc, char *argv[])
> >                                                       GVIR_DESIGNER_DOMAIN_GRAPHICS_SPICE,
> >                                                       &error));
> >      CHECK_ERROR;
> > +    for (i = 0; i < 4; i++) {
> > +        g_object_unref(gvir_designer_domain_add_usb_redir(domain, &error));
> > +        CHECK_ERROR;
> > +    }
> 
> Why 4 times? Moreover, I'd rather see this as optional.

You need one redir channel per USB device you want to be able to redirect
simultaneously, I'll make USB redirection optional indeed, though I'll probably keep
a hardcoded '4' for now, this can be tweaked later.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130605/0bc40cb3/attachment-0001.sig>


More information about the libvir-list mailing list