mirror of
https://github.com/0intro/conterm
synced 2024-11-22 05:41:28 +03:00
20 lines
246 B
C
20 lines
246 B
C
#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;
|
|
}
|