resource_int_value, resource_long_value, resource_string_value — get a value from the hints mechanism
Contents
Description
These functions fetch a value from the “hints” mechanism.
The functions take the following arguments:
name The name of the device to get the resource value from.
unit The unit number of the device. -1 is special and is used for wildcard entries.
resname The resource name.
result A pointer to memory in which to store the resource value.
Errors
The functions will fail if:
[ENOENT] The resource could not be found.
[EFTYPE] Inappropriate resource type.
Name
resource_int_value, resource_long_value, resource_string_value — get a value from the hints mechanism
Return Values
If successful, the functions return 0. Otherwise, a non-zero error code is returned.
See Also
device(9), driver(9)
Synopsis
#include<sys/param.h>#include<sys/bus.h>intresource_int_value(constchar*name, intunit, constchar*resname, int*result);
intresource_long_value(constchar*name, intunit, constchar*resname, long*result);
intresource_string_value(constchar*name, intunit, constchar*resname, constchar**result);
