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