Il 19/08/2014 16:37, Marcel Apfelbaum ha scritto: >> > +static int pci_check_pcie_port(PCIBus *bus, PCIDevice *dev) >> > +{ >> > + Object *obj = OBJECT(bus); >> > + >> > + if (!strcmp(object_get_typename(obj), TYPE_PCIE_BUS)) { > Maybe there is another way to check that this is a PCIe bus? >
It's object_dynamic_cast. Paolo