Loading Preferences and Settings

Many drivers may need some user–configurable per–device preferences or settings. For example, an audio device may have settings to control output volume level, which need to persist across system reboots. A driver cannot trivially access the file system (which is considered bad design anyway), so it cannot read the preferences from a file; however, An I/O Kit driver will have access to information stored in its plist file. The plist file is read-only and shared for all driver instances instantiated by a KEXT. Since a driver may create many instances, all which require different settings the plist file is unsuitable for this purpose.

Although you could implement your own scheme to put per–device settings in a ...

Get OS X and iOS Kernel Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.