powerpc/iseries: Convert to proc_fops
[safe/jmp/linux-2.6] / include / linux / fault-inject.h
index 9bb584e..06ca9b2 100644 (file)
@@ -52,12 +52,13 @@ struct fault_attr {
                .times = ATOMIC_INIT(1),                        \
                .require_end = ULONG_MAX,                       \
                .stacktrace_depth = 32,                         \
+               .verbose = 2,                                   \
        }
 
 #define DECLARE_FAULT_ATTR(name) struct fault_attr name = FAULT_ATTR_INITIALIZER
 int setup_fault_attr(struct fault_attr *attr, char *str);
 void should_fail_srandom(unsigned long entropy);
-int should_fail(struct fault_attr *attr, ssize_t size);
+bool should_fail(struct fault_attr *attr, ssize_t size);
 
 #ifdef CONFIG_FAULT_INJECTION_DEBUG_FS
 
@@ -80,4 +81,13 @@ static inline void cleanup_fault_attr_dentries(struct fault_attr *attr)
 
 #endif /* CONFIG_FAULT_INJECTION */
 
+#ifdef CONFIG_FAILSLAB
+extern bool should_failslab(size_t size, gfp_t gfpflags);
+#else
+static inline bool should_failslab(size_t size, gfp_t gfpflags)
+{
+       return false;
+}
+#endif /* CONFIG_FAILSLAB */
+
 #endif /* _LINUX_FAULT_INJECT_H */