Sign in
plan9port
/
plan9
/
1670a244d90342023fd84cee9fc01347aaed8abc
/
.
/
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
;
}