1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #include <linux/atomic.h> 2 #include <linux/atomic.h> 3 #include <linux/debugfs.h> 3 #include <linux/debugfs.h> 4 #include <linux/notifier.h> 4 #include <linux/notifier.h> 5 5 6 struct notifier_err_inject_action { 6 struct notifier_err_inject_action { 7 unsigned long val; 7 unsigned long val; 8 int error; 8 int error; 9 const char *name; 9 const char *name; 10 }; 10 }; 11 11 12 #define NOTIFIER_ERR_INJECT_ACTION(action) 12 #define NOTIFIER_ERR_INJECT_ACTION(action) \ 13 .name = #action, .val = (action), 13 .name = #action, .val = (action), 14 14 15 struct notifier_err_inject { 15 struct notifier_err_inject { 16 struct notifier_block nb; 16 struct notifier_block nb; 17 struct notifier_err_inject_action acti 17 struct notifier_err_inject_action actions[]; 18 /* The last slot must be terminated wi 18 /* The last slot must be terminated with zero sentinel */ 19 }; 19 }; 20 20 21 extern struct dentry *notifier_err_inject_dir; 21 extern struct dentry *notifier_err_inject_dir; 22 22 23 extern struct dentry *notifier_err_inject_init 23 extern struct dentry *notifier_err_inject_init(const char *name, 24 struct dentry *parent, struct 24 struct dentry *parent, struct notifier_err_inject *err_inject, 25 int priority); 25 int priority); 26 26
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.