* callback.c (os_stat): Make 3rd arg a host struct stat ptr.
authorDoug Evans <dje@google.com>
Tue, 25 Nov 1997 09:33:34 +0000 (09:33 +0000)
committerDoug Evans <dje@google.com>
Tue, 25 Nov 1997 09:33:34 +0000 (09:33 +0000)
commitf33673061fce208257e4c7039c32ddc46fd199e3
tree2b1efe26588dcb026a1699189175c6b12c6e7ac6
parentc76e66831a728440f734cb18cfa354cd8c1344e4
* callback.c (os_stat): Make 3rd arg a host struct stat ptr.
(os_fstat): Likewise.  Validate fd argument.
(cb_host_to_target_stat): Delete big_p arg.  If HS arg is NULL,
just compute target stat struct length.
* syscall.c: #include "libiberty.h", <sys/types.h>, <sys/stat.h>.
(ENOSYS,ENAMETOOLONG): Provide definitions if missing.
(get_string): Return host errno values so they can be properly
translated later.
(cb_syscall): Likewise.
(cb_syscall, cases open,unlink): Use get_path instead of get_string.
(cb_syscall, case read): Use read_stdin for file descriptor 0.
(cb_syscall, case write): Use write_stderr for file descriptor 2.
(cb_syscall): Add cases for lseek, unlink, stat, fstat, time.
(get_path): New function.
sim/common/ChangeLog
sim/common/syscall.c