Hi,
Using the following code, can I assume that I'll always get the IODTNVRAM instance under normal circumstance ? It runs in the start() function of my kext.
Thanks, Antoine
--------------------------
OSDictionary *matchingDictionary = IOService::serviceMatching("IODTNVRAM"); uint64_t nanosecondsTimeout = 20 * 1000000000ULL; IOService::waitForMatchingService(matchingDictionary , nanosecondsTimeout);
IORegistryEntry * re = IORegistryEntry::fromPath("/options", gIODTPlane); IODTNVRAM * nvram = OSDynamicCast(IODTNVRAM, re);
if (nvram) { printf("nvram module found\n"); } else { printf("nvram module not found\n"); }
if (re) re->release();
|