| 156 | } |
| 157 | |
| 158 | bool USBToolBox::checkClassHierarchy(IORegistryEntry* entry, const char* className) { |
| 159 | const OSSymbol* classSymbol = OSSymbol::withCString(className); |
| 160 | |
| 161 | if (!classSymbol) { |
| 162 | DEBUGLOG("Failed to create class symbol for %s!", className); |
| 163 | return false; |
| 164 | } |
| 165 | |
| 166 | const OSMetaClass* entryMetaclass = entry->getMetaClass(); |
| 167 | while (entryMetaclass) { |
| 168 | if (entryMetaclass->getClassNameSymbol() == classSymbol) { |
| 169 | OSSafeReleaseNULL(classSymbol); |
| 170 | return true; |
| 171 | } |
| 172 | entryMetaclass = entryMetaclass->getSuperClass(); |
| 173 | }; |
| 174 | OSSafeReleaseNULL(classSymbol); |
| 175 | return false; |
| 176 | } |
| 177 | |
| 178 | IORegistryEntry* USBToolBox::getControllerViaIteration() { |
| 179 | OSIterator* iterator = pciDevice->getChildIterator(gIOServicePlane); |
nothing calls this directly
no outgoing calls
no test coverage detected