xref: /openbmc/linux/tools/include/linux/panic.h (revision 85907602)
185907602SWei Yang /* SPDX-License-Identifier: GPL-2.0 */
285907602SWei Yang #ifndef _TOOLS_LINUX_PANIC_H
385907602SWei Yang #define _TOOLS_LINUX_PANIC_H
485907602SWei Yang 
585907602SWei Yang #include <stdarg.h>
685907602SWei Yang #include <stdio.h>
785907602SWei Yang #include <stdlib.h>
885907602SWei Yang 
panic(const char * fmt,...)985907602SWei Yang static inline void panic(const char *fmt, ...)
1085907602SWei Yang {
1185907602SWei Yang 	va_list argp;
1285907602SWei Yang 
1385907602SWei Yang 	va_start(argp, fmt);
1485907602SWei Yang 	vfprintf(stderr, fmt, argp);
1585907602SWei Yang 	va_end(argp);
1685907602SWei Yang 	exit(-1);
1785907602SWei Yang }
1885907602SWei Yang 
1985907602SWei Yang #endif
20