ref: 139b9cd7e6a14979bf13c83e512cda054b2279f0
dir: /sys/src/libc/fmt/errfmt.c/
#include <u.h>
#include <libc.h>
#include "fmtdef.h"
int
errfmt(Fmt *f)
{
char buf[ERRMAX];
rerrstr(buf, sizeof buf);
return _fmtcpy(f, buf, utflen(buf), strlen(buf));
}