static void unplug_disks(PCIBus *b, PCIDevice *d, void *o)

{

    /* We have to ignore passthrough devices */

    if (!strcmp(d->name, "xen-pci-passthrough")) {

        return;

    }



    switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) {

    case PCI_CLASS_STORAGE_IDE:

        pci_piix3_xen_ide_unplug(DEVICE(d));

        break;



    case PCI_CLASS_STORAGE_SCSI:

    case PCI_CLASS_STORAGE_EXPRESS:

        object_unparent(OBJECT(d));

        break;



    default:

        break;

    }

}

static void unplug_disks(PCIBus *b, PCIDevice *d, void *o)

{

    

    if (!strcmp(d->name, "xen-pci-passthrough")) {

        return;

    }



    switch (pci_get_word(d->config + PCI_CLASS_DEVICE)) {

    case PCI_CLASS_STORAGE_IDE:

        pci_piix3_xen_ide_unplug(DEVICE(d));

        break;



    case PCI_CLASS_STORAGE_SCSI:

    case PCI_CLASS_STORAGE_EXPRESS:

        object_unparent(OBJECT(d));

        break;



    default:

        break;

    }

}

static void FUNC_0(PCIBus *VAR_0, PCIDevice *VAR_1, void *VAR_2)

{

    

    if (!strcmp(VAR_1->name, "xen-pci-passthrough")) {

        return;

    }



    switch (pci_get_word(VAR_1->config + PCI_CLASS_DEVICE)) {

    case PCI_CLASS_STORAGE_IDE:

        pci_piix3_xen_ide_unplug(DEVICE(VAR_1));

        break;



    case PCI_CLASS_STORAGE_SCSI:

    case PCI_CLASS_STORAGE_EXPRESS:

        object_unparent(OBJECT(VAR_1));

        break;



    default:

        break;

    }

}

static void FUNC_0(PCIBus *VAR_0, PCIDevice *VAR_1, void *VAR_2)
{ if (!strcmp(VAR_1->name, "xen-pci-passthrough")) { return; } switch (pci_get_word(VAR_1->config + PCI_CLASS_DEVICE)) { case PCI_CLASS_STORAGE_IDE:
pci_piix3_xen_ide_unplug(DEVICE(VAR_1)); break; case PCI_CLASS_STORAGE_SCSI:
case PCI_CLASS_STORAGE_EXPRESS:
object_unparent(OBJECT(VAR_1)); break; default:
break; } }