xref: /kernel/linux/linux-6.6/lib/notifier-error-inject.h
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/lib/
162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#include <linux/atomic.h>
362306a36Sopenharmony_ci#include <linux/debugfs.h>
462306a36Sopenharmony_ci#include <linux/notifier.h>
562306a36Sopenharmony_ci
662306a36Sopenharmony_cistruct notifier_err_inject_action {
762306a36Sopenharmony_ci	unsigned long val;
862306a36Sopenharmony_ci	int error;
962306a36Sopenharmony_ci	const char *name;
1062306a36Sopenharmony_ci};
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#define NOTIFIER_ERR_INJECT_ACTION(action)	\
1362306a36Sopenharmony_ci	.name = #action, .val = (action),
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cistruct notifier_err_inject {
1662306a36Sopenharmony_ci	struct notifier_block nb;
1762306a36Sopenharmony_ci	struct notifier_err_inject_action actions[];
1862306a36Sopenharmony_ci	/* The last slot must be terminated with zero sentinel */
1962306a36Sopenharmony_ci};
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciextern struct dentry *notifier_err_inject_dir;
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ciextern struct dentry *notifier_err_inject_init(const char *name,
2462306a36Sopenharmony_ci		struct dentry *parent, struct notifier_err_inject *err_inject,
2562306a36Sopenharmony_ci		int priority);
26

Indexes created Thu Nov 07 10:32:03 CST 2024