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.
This commit is contained in:
parent
8110278003
commit
169aba14a4
3 changed files with 14 additions and 14 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue