Sign in
plan9port
/
plan9
/
b15fd97627767291628309677c40b3f40b868497
/
.
/
src
/
libdraw
/
unix.c
blob: 76bc75d0d618b00e31c3154508f3fd94d9d73de9 [
file
] [
log
] [
blame
]
#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
;
}