FreeBSD kernel kern code
subr_hints.c File Reference
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/systm.h>
#include <sys/bus.h>
Include dependency graph for subr_hints.c:

Go to the source code of this file.

Functions

 __FBSDID ("$BSDSUniX$")
 
static int res_find (int *line, int *startln, const char *name, int *unit, const char *resname, const char *value, const char **ret_name, int *ret_namelen, int *ret_unit, const char **ret_resname, int *ret_resnamelen, const char **ret_value)
 
static int resource_find (int *line, int *startln, const char *name, int *unit, const char *resname, const char *value, const char **ret_name, int *ret_namelen, int *ret_unit, const char **ret_resname, int *ret_resnamelen, const char **ret_value)
 
int resource_int_value (const char *name, int unit, const char *resname, int *result)
 
int resource_long_value (const char *name, int unit, const char *resname, long *result)
 
int resource_string_value (const char *name, int unit, const char *resname, const char **result)
 
static const char * resource_string_copy (const char *s, int len)
 
int resource_find_match (int *anchor, const char **name, int *unit, const char *resname, const char *value)
 
int resource_find_dev (int *anchor, const char *name, int *unit, const char *resname, const char *value)
 
int resource_disabled (const char *name, int unit)
 

Variables

static int checkmethod = 1
 
static int use_kenv
 
static char * hintp
 

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
static int res_find ( int *  line,
int *  startln,
const char *  name,
int *  unit,
const char *  resname,
const char *  value,
const char **  ret_name,
int *  ret_namelen,
int *  ret_unit,
const char **  ret_resname,
int *  ret_resnamelen,
const char **  ret_value 
)
static

Definition at line 50 of file subr_hints.c.

References checkmethod, dynamic_kenv, hintp, kenv_lock, kenvp, kern_envp, printf(), sscanf(), and use_kenv.

Referenced by resource_find().

Here is the call graph for this function:

Here is the caller graph for this function:

int resource_disabled ( const char *  name,
int  unit 
)

Definition at line 375 of file subr_hints.c.

References resource_int_value(), and value.

Referenced by device_attach().

Here is the call graph for this function:

Here is the caller graph for this function:

static int resource_find ( int *  line,
int *  startln,
const char *  name,
int *  unit,
const char *  resname,
const char *  value,
const char **  ret_name,
int *  ret_namelen,
int *  ret_unit,
const char **  ret_resname,
int *  ret_resnamelen,
const char **  ret_value 
)
static

Definition at line 201 of file subr_hints.c.

References res_find().

Referenced by resource_find_dev(), resource_find_match(), resource_int_value(), resource_long_value(), and resource_string_value().

Here is the call graph for this function:

Here is the caller graph for this function:

int resource_find_dev ( int *  anchor,
const char *  name,
int *  unit,
const char *  resname,
const char *  value 
)

Definition at line 354 of file subr_hints.c.

References resource_find().

Here is the call graph for this function:

int resource_find_match ( int *  anchor,
const char **  name,
int *  unit,
const char *  resname,
const char *  value 
)

Definition at line 325 of file subr_hints.c.

References resource_find(), and resource_string_copy().

Referenced by bus_enumerate_hinted_children().

Here is the call graph for this function:

Here is the caller graph for this function:

int resource_int_value ( const char *  name,
int  unit,
const char *  resname,
int *  result 
)

Definition at line 230 of file subr_hints.c.

References resource_find().

Referenced by device_probe_child(), and resource_disabled().

Here is the call graph for this function:

Here is the caller graph for this function:

int resource_long_value ( const char *  name,
int  unit,
const char *  resname,
long *  result 
)

Definition at line 253 of file subr_hints.c.

References resource_find().

Here is the call graph for this function:

static const char* resource_string_copy ( const char *  s,
int  len 
)
static

Definition at line 297 of file subr_hints.c.

Referenced by resource_find_match().

Here is the caller graph for this function:

int resource_string_value ( const char *  name,
int  unit,
const char *  resname,
const char **  result 
)

Definition at line 277 of file subr_hints.c.

References resource_find().

Referenced by devclass_alloc_unit().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int checkmethod = 1
static

Definition at line 40 of file subr_hints.c.

Referenced by res_find().

char* hintp
static

Definition at line 42 of file subr_hints.c.

Referenced by res_find().

int use_kenv
static

Definition at line 41 of file subr_hints.c.

Referenced by res_find().