#include <9pm/u.h>
#include <9pm/libc.h>
#include <9pm/fcall.h>

int
dirfwstat(int fd, Dir *d)
{
	uchar *buf;
	int r;

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