Projet_SETI_RISC-V/riscv-gnu-toolchain/newlib/libgloss/i960/mon-read.c

19 lines
223 B
C
Raw Normal View History

2023-03-06 14:48:14 +01:00
#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;
}