The resource loading functions discussed in the previous section are designed for a specific purpose. The I/O Kit functions provide a driver with read-only access to the contents of a file within its Resources
directory. However, there are many situations where it is useful for a driver to access a file outside of its bundle and to write to a file on disk. For example, a driver that provides persistent settings will need some way to read those settings from a file on disk. It will also need a way to write those settings to disk.
Although the I/O Kit contains no functions that provide such functionality to a driver, its implementation of the resource loading functions provides us with a hint of how we might add such functionality to our own drivers. Just as the I/O Kit relies upon a user space daemon process to load resource files on behalf of the kernel, a driver can implement the reading and writing of its persistent settings from a file on disk by providing its own user space daemon process to handle requests on its behalf. This design, covered in the following section, opens up a more general solution that can be extended beyond driver preferences.
3.133.130.199