0001
0002 #include <linux/atomic.h>
0003 #include <linux/debugfs.h>
0004 #include <linux/notifier.h>
0005
0006 struct notifier_err_inject_action {
0007 unsigned long val;
0008 int error;
0009 const char *name;
0010 };
0011
0012 #define NOTIFIER_ERR_INJECT_ACTION(action) \
0013 .name = #action, .val = (action),
0014
0015 struct notifier_err_inject {
0016 struct notifier_block nb;
0017 struct notifier_err_inject_action actions[];
0018
0019 };
0020
0021 extern struct dentry *notifier_err_inject_dir;
0022
0023 extern struct dentry *notifier_err_inject_init(const char *name,
0024 struct dentry *parent, struct notifier_err_inject *err_inject,
0025 int priority);