Back to home page

LXR

 
 

    


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