Looks up a registry entry by path.
SDKs
- macOS 10.0+
- Mac Catalyst 13.0+
Framework
- IOKit
Declaration
func IORegistryEntryFromPath(_ masterPort: mach _port _t, _ path: Unsafe Pointer<Int8>!) -> io _registry _entry _t
Parameters
masterPort
The master port obtained from IOMasterPort(). Pass kIOMasterPortDefault to look up the default master port.
path
A C-string path.
Return Value
A handle to the IORegistryEntry witch was found with the path, to be released with IOObjectRelease by the caller, or MACH_PORT_NULL on failure.
Discussion
This function parses paths to lookup registry entries. The path should begin with '<plane name>:' If there are characters remaining unparsed after an entry has been looked up, this is considered an invalid lookup. Paths are further documented in IORegistryEntry.h