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