FreeBSD kernel kern code
|
![]() |
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) |
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).
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.
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().