uc-sdk
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
lseek.c
Go to the documentation of this file.
1
#include "
reent.h
"
2
#include "
errno.h
"
3
#include <
fio.h
>
4
5
off_t
lseek
(
int
fd
,
off_t
seek,
int
wheel) {
6
off_t
r;
7
8
if
((wheel !=
SEEK_SET
) && (wheel !=
SEEK_CUR
) && (wheel !=
SEEK_END
)) {
9
set_errno(
EINVAL
);
10
return
-1;
11
}
12
13
if
(!
fio_is_open
(fd)) {
14
set_errno(
EBADF
);
15
return
-1;
16
}
17
18
r =
fio_seek
(fd, seek, wheel);
19
20
if
(r < 0)
21
set_errno(
EINVAL
);
22
23
return
r;
24
}
libc
src
lseek.c
Generated on Fri Nov 15 2013 05:00:19 for uc-sdk by
1.8.4