code: drawterm

ref: ee5fc884bd37db9cba56d603b8d4e30b0cc78083
dir: /libc/dirwstat.c/

View raw version
#include <u.h>
#include <libc.h>
#include <fcall.h>

int
dirwstat(char *name, Dir *d)
{
	uchar *buf;
	int r;

	r = sizeD2M(d);
	buf = malloc(r);
	if(buf == nil)
		return -1;
	convD2M(d, buf, r);
	r = wstat(name, buf, r);
	free(buf);
	return r;
}