uc-sdk
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
write.c
Go to the documentation of this file.
1
#include "
reent.h
"
2
#include "
errno.h
"
3
#include <
fio.h
>
4
5
ssize_t
write
(
int
fd,
const
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_write
(fd, buf, size);
14
15
if
(r < 0) {
16
set_errno(
EINVAL
);
17
return
-1;
18
}
19
20
return
r;
21
}
libc
src
write.c
Generated on Fri Nov 15 2013 05:00:19 for uc-sdk by
1.8.4