Re: [PATCH 3/6] pci: Introduce virPCIStubDriver enumeration

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

 



On Thu, 2015-12-17 at 17:28 +0100, Michal Privoznik wrote:
> > 
> >  typedef enum {
> > +    VIR_PCI_STUB_DRIVER_XEN = 0,
> > +    VIR_PCI_STUB_DRIVER_KVM,
> > +    VIR_PCI_STUB_DRIVER_VFIO,
> > +    VIR_PCI_STUB_DRIVER_LAST
> > +} virPCIStubDriver;
> 
> Is there any specific reason to explicitly set _XEN = 0? I mean, by
> default any new PCI device that we create in memory (virPCIDeviceNew())
> will have _XEN as stub driver until set by virPCIDeviceSetStubDriver().
> I'm not saying it's wrong, just asking.
> 
> For instance, if we reserve zero for a special case when stub driver
> hasn't been set, we can throw an error and detect a bug in our code.

Not really. I've changed it to follow your advice.

  https://www.redhat.com/archives/libvir-list/2015-December/msg00740.html

Cheers.

-- 
Andrea Bolognani
Software Engineer - Virtualization Team

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]