iPXE
|
Fault injection. More...
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
int | inject_fault_nonzero (unsigned int rate) |
Inject fault with a specified probability. More... | |
void | inject_corruption_nonzero (unsigned int rate, const void *data, size_t len) |
Corrupt data with a specified probability. More... | |
Fault injection.
Definition in file fault.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
int inject_fault_nonzero | ( | unsigned int | rate | ) |
Inject fault with a specified probability.
rate | Reciprocal of fault probability (must be non-zero) |
rc | Return status code |
Definition at line 42 of file fault.c.
References EFAULT, and random().
Referenced by __attribute__(), and inject_corruption_nonzero().
void inject_corruption_nonzero | ( | unsigned int | rate, |
const void * | data, | ||
size_t | len | ||
) |
Corrupt data with a specified probability.
rate | Reciprocal of fault probability (must be non-zero) |
data | Data |
len | Length of data |
rc | Return status code |
Definition at line 63 of file fault.c.
References data, inject_fault_nonzero(), len, offset, and random().