repo.or.cz
/
tangerine.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
add a missing section header table index conversion
[tangerine.git]
/
compiler
/
clib
/
fstat.c
blob
c61d8359ebd2b0a10b23184940c86071a4ffdcc3
1
/*
2
Copyright © 1995-2001, The AROS Development Team. All rights reserved.
3
$Id$
4
5
ANSI C function fstat().
6
*/
7
8
#include <errno.h>
9
10
#include
"__stat.h"
11
#include
"__open.h"
12
13
#include <sys/stat.h>
14
15
16
int
fstat
(
int
fd
,
struct
stat
*
sb
)
17
{
18
fdesc
*
desc
=
__getfdesc
(
fd
);
19
20
if
(!
desc
)
21
{
22
errno
=
EBADF
;
23
24
return
-
1
;
25
}
26
27
return
__stat
(
desc
->
fh
,
sb
);
28
}