Files

29 lines
630 B
C
Raw Permalink Normal View History

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_ERROR_INJECTION_H
#define _LINUX_ERROR_INJECTION_H
#include <linux/compiler.h>
2022-12-12 11:46:44 +09:00
#include <linux/errno.h>
#include <asm-generic/error-injection.h>
#ifdef CONFIG_FUNCTION_ERROR_INJECTION
extern bool within_error_injection_list(unsigned long addr);
2018-01-13 02:55:33 +09:00
extern int get_injectable_error_type(unsigned long addr);
#else /* !CONFIG_FUNCTION_ERROR_INJECTION */
static inline bool within_error_injection_list(unsigned long addr)
{
return false;
}
2018-01-13 02:55:33 +09:00
static inline int get_injectable_error_type(unsigned long addr)
{
2022-12-12 11:46:44 +09:00
return -EOPNOTSUPP;
2018-01-13 02:55:33 +09:00
}
#endif
#endif /* _LINUX_ERROR_INJECTION_H */