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