[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 01/14] Don't block use of USB with containers



On Fri, Feb 07, 2014 at 08:50:19AM -0700, Eric Blake wrote:
> On 02/07/2014 08:32 AM, Daniel P. Berrange wrote:
> > virDomainDefCompatibleDevice blocks use of USB if no USB
> > controller is present. This is not correct for containers
> > since devices can be assigned directly regardless of any
> > controllers.
> > 
> > Signed-off-by: Daniel P. Berrange <berrange redhat com>
> > ---
> >  src/conf/domain_conf.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> > index 512fe51..61e69e1 100644
> > --- a/src/conf/domain_conf.c
> > +++ b/src/conf/domain_conf.c
> > @@ -17582,6 +17582,7 @@ virDomainDefCompatibleDevice(virDomainDefPtr def,
> >                               virDomainDeviceDefPtr dev)
> >  {
> >      if (!virDomainDefHasUSB(def) &&
> > +        STRNEQ(def->os.type, "exe") &&
> 
> Elsewhere we alternate between STREQ_NULLABLE
> (virDomainDeviceInfoIterateInternal) and mandating os.type
> (virDomainDefPostParseInternal).  Which is right?  Can os.type validly
> be NULL?
> 
> Depending on the answer, you may need STREQ_NULLABLE here, or a followup
> patches to the other places; but with that fixed, ACK.

In virDomainDefPostParseInternal we have:

    if (!def->os.type) {
        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
                       _("hypervisor type must be specified"));
        return -1;
    }

So I believe we're fine here.

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 :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]