FreeBSD kernel kern code
fail(9) Facility
Collaboration diagram for fail(9) Facility:

Modules

 Private fail(9) Implementation functions
 

Functions

void fail_point_init (struct fail_point *fp, const char *fmt,...)
 
void fail_point_destroy (struct fail_point *fp)
 

Detailed Description

Failpoints allow for injecting fake errors into running code on the fly, without modifying code or recompiling with flags. Failpoints are always present, and are very efficient when disabled. Failpoints are described in man fail(9).

Function Documentation

void fail_point_destroy ( struct fail_point *  fp)

Free the resources held by a fail_point.

Definition at line 198 of file kern_fail.c.

References clear_entries(), and fp_free.

Here is the call graph for this function:

void fail_point_init ( struct fail_point *  fp,
const char *  fmt,
  ... 
)

Initialize a fail_point. The name is formed in a printf-like fashion from "fmt" and subsequent arguments. This function is generally used for custom failpoints located at odd places in the sysctl tree, and is not explicitly needed for standard in-line-declared failpoints.

Definition at line 164 of file kern_fail.c.

References fp_malloc, name, and vsnprintf().

Here is the call graph for this function: