1
0

panic.h 311 B

12345678910111213141516171819
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _TOOLS_LINUX_PANIC_H
  3. #define _TOOLS_LINUX_PANIC_H
  4. #include <stdarg.h>
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. static inline void panic(const char *fmt, ...)
  8. {
  9. va_list argp;
  10. va_start(argp, fmt);
  11. vfprintf(stderr, fmt, argp);
  12. va_end(argp);
  13. exit(-1);
  14. }
  15. #endif