-
Notifications
You must be signed in to change notification settings - Fork 2
/
error.h
20 lines (17 loc) · 795 Bytes
/
error.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: GPL-2.0-or-later
#ifndef __ERROR_H
#define __ERROR_H
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
void err_exit(int err, char *fmt, ...) __attribute__((format(printf, 2, 3)));
void err_msg(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void err_msg_n(int err, char *fmt, ...) __attribute__((format(printf, 2, 3)));
void err_quit(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void debug(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void info(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void warn(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void fatal(char *fmt, ...) __attribute__((format(printf, 1, 2)));
void err_doit(int err, const char *fmt, va_list ap);
#endif /* __ERROR_H */