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.
diff --git a/src/lib9/errstr.c b/src/lib9/errstr.c
index e576b12..504ec6e 100644
--- a/src/lib9/errstr.c
+++ b/src/lib9/errstr.c
@@ -66,3 +66,15 @@
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);
+}