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