blob: 76bc75d0d618b00e31c3154508f3fd94d9d73de9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
#include <u.h>
#include <sys/stat.h>
#include <libc.h>
#include <draw.h>
vlong
_drawflength(int fd)
{
struct stat s;
if(fstat(fd, &s) < 0)
return -1;
return s.st_size;
}
|