diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib9/Makefile | 3 | ||||
-rw-r--r-- | src/lib9/errstr.c | 12 | ||||
-rw-r--r-- | src/lib9/werrstr.c | 13 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/lib9/Makefile b/src/lib9/Makefile index 885d205c..f702a5c5 100644 --- a/src/lib9/Makefile +++ b/src/lib9/Makefile @@ -16,10 +16,12 @@ OFILES=\ lock.$O\ malloctag.$O\ mallocz.$O\ + netmkaddr.$O\ nrand.$O\ qlock.$O\ readn.$O\ rendez-$(SYSNAME).$O\ + sleep.$O\ strecpy.$O\ sysfatal.$O\ tas-$(OBJTYPE).$O\ @@ -28,7 +30,6 @@ OFILES=\ u32.$O\ u64.$O\ wait.$O\ - werrstr.$O\ HFILES=\ $(PLAN9)/include/lib9.h\ diff --git a/src/lib9/errstr.c b/src/lib9/errstr.c index e576b12b..504ec6ec 100644 --- a/src/lib9/errstr.c +++ b/src/lib9/errstr.c @@ -66,3 +66,15 @@ __errfmt(Fmt *f) return fmtstrcpy(f, getsyserr()); return fmtstrcpy(f, strerror(errno)); } + +void +werrstr(char *fmt, ...) +{ + va_list arg; + char buf[ERRMAX]; + + va_start(arg, fmt); + vseprint(buf, buf+ERRMAX, fmt, arg); + va_end(arg); + errstr(buf, ERRMAX); +} diff --git a/src/lib9/werrstr.c b/src/lib9/werrstr.c deleted file mode 100644 index 7fa1f2ea..00000000 --- a/src/lib9/werrstr.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <lib9.h> - -void -werrstr(char *fmt, ...) -{ - va_list arg; - char buf[ERRMAX]; - - va_start(arg, fmt); - vseprint(buf, buf+ERRMAX, fmt, arg); - va_end(arg); - errstr(buf, ERRMAX); -} |