847e89f8e1
2007-07-12 Daniel Jacobowitz <dan@codesourcery.com> * arm/syscalls.c (_stat): Use _close * arm/syscalls.c (struct poslog): Rename to... (struct fdent): ... this. (FILE_HANDLE_OFFSET): Remove. (findslot): Return a struct fdent* if fd is valid, otherwise return NULL. (newslot): New function. (remap_handle): Remove. (initialise_monitor_handles): Use stdout as fallback for stderr. (wrap): Rename to... (checkerror): ... this. (_swiread): Use checkerror() for the return of SWI calls. Correct the use of r0. (_read): Use findslot(). Return EBADF on bad handle. (_swilseek): Call findslot(). Check for valid whence. Check for negative offset when using SEEK_CUR, and check for overflow. Use checkerror(). Check *_Flen calls for errors. (_swiwrite): Correct the use of r0. (_write): Call findslot(). (_swiopen): Call findslot(). Check for valid flags. Use checkerror(). Call newslot(). Handle O_TRUNC, and O_WRONLY. Return index into openfiles[] for fd. (_swiclose): Correct the use of r0. (_close): Handle stderr == stdout case. Only reclaim handle if _swiclose succeeded. (_getpid): Use __attribute__((unused)). (_sbrk): Fix formatting. (_swistat): New function. (_stat): Call _swistat(). (_fstat): Call _swistat(). (_unlink): Correct the use of r0. (isatty): Call finslot(). Correct the use of r0. (_system): Call checkerror(). Correct the use of r0. (_rename): Correct the use of r0. |
||
---|---|---|
.. | ||
_exit.c | ||
_kill.c | ||
aclocal.m4 | ||
coff-iq80310.specs | ||
coff-pid.specs | ||
coff-rdimon.specs | ||
coff-rdpmon.specs | ||
coff-redboot.ld | ||
coff-redboot.specs | ||
configure | ||
configure.in | ||
crt0.S | ||
elf-iq80310.specs | ||
elf-linux.specs | ||
elf-pid.specs | ||
elf-rdimon.specs | ||
elf-rdpmon.specs | ||
elf-redboot.ld | ||
elf-redboot.specs | ||
libcfunc.c | ||
linux-crt0.c | ||
linux-syscall.h | ||
linux-syscalls0.S | ||
linux-syscalls1.c | ||
Makefile.in | ||
redboot-crt0.S | ||
redboot-syscalls.c | ||
swi.h | ||
syscall.h | ||
syscalls.c | ||
trap.S |