diff options
Diffstat (limited to 'src/user/lib')
-rw-r--r-- | src/user/lib/err.c | 14 | ||||
-rw-r--r-- | src/user/lib/include/err.h | 2 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/user/lib/err.c b/src/user/lib/err.c index 7684b6d..7a220fe 100644 --- a/src/user/lib/err.c +++ b/src/user/lib/err.c @@ -20,6 +20,20 @@ _Noreturn void errx(int ret, const char *fmt, ...) { exit(ret); } +void warn(const char *fmt, ...) { + va_list args; + va_start(args, fmt); + vwarn(fmt, args); + va_end(args); +} + +void warnx(const char *fmt, ...) { + va_list args; + va_start(args, fmt); + vwarnx(fmt, args); + va_end(args); +} + void vwarn(const char *fmt, va_list args) { fprintf(stderr, "%s: ", getprogname()); if (fmt) { diff --git a/src/user/lib/include/err.h b/src/user/lib/include/err.h index 9ce4253..6b63c6c 100644 --- a/src/user/lib/include/err.h +++ b/src/user/lib/include/err.h @@ -3,6 +3,8 @@ _Noreturn void err(int ret, const char *fmt, ...); _Noreturn void errx(int ret, const char *fmt, ...); +void warn(const char *fmt, ...); +void warnx(const char *fmt, ...); void vwarn(const char *fmt, va_list args); void vwarnx(const char *fmt, va_list args); |