WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 3/3] xen: implement unplug protocol in xen_platfo

On Fri, 17 Jun 2011, Anthony PERARD wrote:
> > +static void unplug_nic(PCIBus *b, PCIDevice *d)
> > +{
> > +    if (d->config[0xa] == 0 && d->config[0xb] == 2) {
> 
> You should use:
> pci_get_word(d->config+PCI_CLASS_DEVICE) == PCI_CLASS_NETWORK_ETHERNET
> 
> It'll be clearer.
> 

thanks, I'll do that

> > +static void unplug_disks(PCIBus *b, PCIDevice *d)
> > +{
> > +    if (d->config[0xa] == 1 && d->config[0xb] == 1) {
> 
> Same here with PCI_CLASS_STORAGE_IDE.
> 

OK
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel