blob: fafff5f2ac45b9935427b9272bb284e375e6b789 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Akinobu Mita8d438282012-07-30 14:43:02 -07002#include <linux/atomic.h>
3#include <linux/debugfs.h>
4#include <linux/notifier.h>
5
6struct notifier_err_inject_action {
7 unsigned long val;
8 int error;
9 const char *name;
10};
11
12#define NOTIFIER_ERR_INJECT_ACTION(action) \
13 .name = #action, .val = (action),
14
15struct notifier_err_inject {
16 struct notifier_block nb;
17 struct notifier_err_inject_action actions[];
18 /* The last slot must be terminated with zero sentinel */
19};
20
21extern struct dentry *notifier_err_inject_dir;
22
23extern struct dentry *notifier_err_inject_init(const char *name,
24 struct dentry *parent, struct notifier_err_inject *err_inject,
25 int priority);