mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-26 16:29:28 +00:00
19 lines
223 B
C
19 lines
223 B
C
#include <errno.h>
|
|
|
|
read (fd, buf, sz)
|
|
int fd;
|
|
char *buf;
|
|
int sz;
|
|
{
|
|
int nread;
|
|
int r;
|
|
|
|
r = _sys_read (fd, buf, sz, &nread);
|
|
if (r != 0)
|
|
{
|
|
errno = r;
|
|
return -1;
|
|
}
|
|
return nread;
|
|
}
|