summaryrefslogtreecommitdiff
path: root/src/user/lib/err.c
diff options
context:
space:
mode:
authordzwdz2022-12-27 22:42:06 +0100
committerdzwdz2022-12-27 22:42:06 +0100
commit8ac68ecab5734d5c5f3638397e5a9e6084fe7737 (patch)
tree209fcf07d7d4c5f3555a3f78800ba86bd91482c7 /src/user/lib/err.c
parent35a82cb0dae43eb538de7afa1da77c4e249ba4e4 (diff)
sh: minor usability / aesthetic improvements
Diffstat (limited to 'src/user/lib/err.c')
-rw-r--r--src/user/lib/err.c14
1 files changed, 14 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) {