Replace individual structure element comments with reference
to Documentation/fault-injection/fault-injection.txt
Init "interval" to 1 (smallest useful value).
Init "times" to 1 rather than -1 (infinity), for fewer
accidental system lockups.
Signed-off-by: Don Mullis <[email protected]>
---
include/linux/fault-inject.h | 20 +++++---------------
1 file changed, 5 insertions(+), 15 deletions(-)
Index: linux-2.6.17/include/linux/fault-inject.h
===================================================================
--- linux-2.6.17.orig/include/linux/fault-inject.h
+++ linux-2.6.17/include/linux/fault-inject.h
@@ -6,31 +6,21 @@
#include <linux/types.h>
#include <asm/atomic.h>
+/*
+ * For explanation of the elements of this struct, see
+ * Documentation/fault-injection/fault-injection.txt
+ */
struct fault_attr {
-
- /* how often it should fail in percent. */
unsigned long probability;
-
- /* the interval of failures. */
unsigned long interval;
-
- /*
- * how many times failures may happen at most.
- * A value of '-1' means infinity.
- */
atomic_t times;
-
- /*
- * the size of free space where memory can be allocated safely.
- * A value of '0' means infinity.
- */
atomic_t space;
unsigned long count;
};
#define DEFINE_FAULT_ATTR(name) \
- struct fault_attr name = { .times = ATOMIC_INIT(-1), }
+ struct fault_attr name = { .interval=1, .times = ATOMIC_INIT(1), }
int setup_fault_attr(struct fault_attr *attr, char *str);
void should_fail_srandom(unsigned long entropy);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]