diff options
| author | Andrew Morton <akpm@linux-foundation.org> | 2024-04-16 14:04:59 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2024-04-16 14:04:59 -0700 |
| commit | 640958fde130acfea98f539dfd4de6a9e72cf012 (patch) | |
| tree | c122cb130940b99f79e9b21cdc00c7437afd98ce /tools/include/linux/panic.h | |
| parent | 4e2e3612922529f03a6fb380d416ba8c968b34cc (diff) | |
| parent | 0bbac3facb5d6cc0171c45c9873a2dc96bea9680 (diff) | |
Merge branch 'master' into mm-stable
Diffstat (limited to 'tools/include/linux/panic.h')
| -rw-r--r-- | tools/include/linux/panic.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/include/linux/panic.h b/tools/include/linux/panic.h new file mode 100644 index 000000000000..9c8f17a41ce8 --- /dev/null +++ b/tools/include/linux/panic.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _TOOLS_LINUX_PANIC_H +#define _TOOLS_LINUX_PANIC_H + +#include <stdarg.h> +#include <stdio.h> +#include <stdlib.h> + +static inline void panic(const char *fmt, ...) +{ + va_list argp; + + va_start(argp, fmt); + vfprintf(stderr, fmt, argp); + va_end(argp); + exit(-1); +} + +#endif |
