Contents

compareNames

Compares the name of the entry with one or more names, and optionally returns the matching name.

Declaration

virtual bool compareNames(
 OSObject *name,
 OSString **matched = 0 ) const;

Parameters

  • name:

    The name or names to compare with as any OSCollection (eg. OSArray, OSSet, OSDictionary) of OSStrings, or a single name may be passed an OSString.

  • matched:

    If the caller wants the successfully matched name returned, pass a non-zero pointer for the matched parameter and an OSString will be returned here. It should be released by the caller.

Return Value

True if one of the names compared true with the entry's global name.

Overview

This method is called during IOService name matching and elsewhere to compare the entry's global name with a list of names, or a single name. A list of names may be passed as any OSCollection of OSStrings, while a single name may be passed an OSString, in the name parameter. compareNames will call the compareName method for each name, for overrides.

See Also

Miscellaneous