io
io — Helpers for file I/O
|
|
Includes
#include <igt_io.h>
Description
This library provides helpers for file I/O
Functions
igt_readn ()
ssize_t
igt_readn (int fd
,
char *buf
,
size_t len
);
Read from fd into provided buffer until the buffer is full or EOF
Returns
-errno on failure or bytes read on success
igt_writen ()
ssize_t
igt_writen (int fd
,
const char *buf
,
size_t len
);
This writes len
bytes from data
to the sysfs file.
Returns
-errno on failure or bytes written on success