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