Contents

fromPath(const char *, const IORegistryPlane *, char *, int *, IORegistryEntry *)

Looks up a registry entry by path.

Declaration

static IORegistryEntry * fromPath(
 const char *path, 
 const IORegistryPlane *plane = 0, 
 char *residualPath = 0, 
 int *residualLength = 0, 
 IORegistryEntry *fromEntry = 0 );

Parameters

  • path:

    A C-string path.

  • plane:

    The plane to lookup up the path, or zero, in which case the path must begin with the plane name.

  • residualPath:

    If the path may contain residual characters after the last path component, the residual will be copied back to the caller's residualPath buffer. If there are residual characters and no residual buffer is specified, fromPath will fail.

  • residualLength:

    An in/out parameter - the caller sets the length of the residual buffer available, and fromPath returns the total length of the residual path copied to the buffer. If there is no residualBuffer (residualPath = 0) then residualLength may be zero also.

  • fromEntry:

    The lookup will proceed rooted at this entry if non-zero, otherwise it proceeds from the root of the plane.

Return Value

A retained registry entry is returned on success, or zero on failure. The caller should release the entry.

Overview

This function parses paths to lookup registry entries. The path may begin with the <plane name>: created by getPath, or the plane may be set by the caller. If there are characters remaining unparsed after an entry has been looked up, this may be considered an invalid lookup, or those characters may be passed back to the caller and the lookup successful.

See Also

Miscellaneous