| 1 | // SPDX-License-Identifier: GPL-2.0-or-later |
| 2 | #ifndef __ERROR_H |
| 3 | #define __ERROR_H |
| 4 | |
| 5 | #include <stdio.h> |
| 6 | #include <stdlib.h> |
| 7 | #include <stdarg.h> |
| 8 | #include <string.h> |
| 9 | |
| 10 | void err_exit(int err, char *fmt, ...) __attribute__((noreturn)); |
| 11 | void err_msg(char *fmt, ...); |
| 12 | void err_msg_n(int err, char *fmt, ...); |
| 13 | void err_quit(char *fmt, ...) __attribute__((noreturn)); |
| 14 | void debug(int enable, char *fmt, ...); |
| 15 | void info(int enable, char *fmt, ...); |
| 16 | void warn(char *fmt, ...); |
| 17 | void fatal(char *fmt, ...) __attribute__((noreturn)); |
| 18 | void err_doit(int err, const char *fmt, va_list ap); |
| 19 | |
| 20 | #endif /* __ERROR_H */ |