diff options
author | rsc <devnull@localhost> | 2003-10-14 02:10:47 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-10-14 02:10:47 +0000 |
commit | 169aba14a4766b3d15695ef27681d0f1d04f8521 (patch) | |
tree | cc6b42f4f9064489bc2b74a250b1f495c7882ff8 /src/lib9/errstr.c | |
parent | 8110278003252f8579d61cd99392801a1857cdc2 (diff) | |
download | plan9port-169aba14a4766b3d15695ef27681d0f1d04f8521.tar.gz plan9port-169aba14a4766b3d15695ef27681d0f1d04f8521.tar.bz2 plan9port-169aba14a4766b3d15695ef27681d0f1d04f8521.zip |
Move werrstr into errstr, so that if you use werrstr
you have to get this __errfmt instead of the one
in libfmt that only does Unix error codes.
Diffstat (limited to 'src/lib9/errstr.c')
-rw-r--r-- | src/lib9/errstr.c | 12 |
1 files changed, 12 insertions, 0 deletions
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); +} |