ref: 91fdb62ad0c4597f645c3357ea942cadfea188ab
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));
}