{ 0, NULL },
};
+#ifndef FREEBSD
int
sys_lseek(tcp)
struct tcb *tcp;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
-#ifndef FREEBSD
offset = tcp->u_arg[1];
_whence = tcp->u_arg[2];
if (_whence == SEEK_SET)
tprintf("%lu, ", offset);
else
tprintf("%ld, ", offset);
-#else /* FREEBSD */
- offset = ((off_t) tcp->u_arg[1] << 32) + tcp->u_arg[2];
- _whence = tcp->u_arg[4];
- if (_whence == SEEK_SET)
- tprintf("%llu, ", offset);
- else
- tprintf("%lld, ", offset);
-#endif
printxval(whence, _whence, "SEEK_???");
}
-#ifdef FREEBSD
- else
- if (!syserror(tcp))
- return RVAL_LUDECIMAL;
-#endif /* FREEBSD */
return RVAL_UDECIMAL;
}
+#endif
#ifdef linux
int
}
#endif
-#if _LFS64_LARGEFILE
+#if _LFS64_LARGEFILE || FREEBSD
int
sys_lseek64 (tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
- long long offset = get64(tcp->u_arg [1], tcp->u_arg[2]);
+ long long offset;
+ ALIGN64 (tcp, 1); /* FreeBSD aligns off_t args */
+ offset = get64(tcp->u_arg [1], tcp->u_arg[2]);
if (tcp->u_arg[3] == SEEK_SET)
tprintf("%ld, %llu, ", tcp->u_arg[0], offset);
else
}
#endif
+#ifndef FREEBSD
int
sys_truncate(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
printpath(tcp, tcp->u_arg[0]);
-#ifndef FREEBSD
tprintf(", %lu", tcp->u_arg[1]);
-#else
- tprintf(", %llu", ((off_t) tcp->u_arg[1] << 32) + tcp->u_arg[2]);
-#endif
}
return 0;
}
+#endif
-#if _LFS64_LARGEFILE
+#if _LFS64_LARGEFILE || FREEBSD
int
sys_truncate64(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
+ ALIGN64 (tcp, 1);
printpath(tcp, tcp->u_arg[0]);
tprintf(", %llu", get64(tcp->u_arg[1],tcp->u_arg[2]));
}
}
#endif
+#ifndef FREEBSD
int
sys_ftruncate(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
-#ifndef FREEBSD
tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
-#else
- tprintf("%ld, %llu", tcp->u_arg[0],
- ((off_t) tcp->u_arg[1] << 32) + tcp->u_arg[2]);
-#endif
}
return 0;
}
+#endif
-#if _LFS64_LARGEFILE
+#if _LFS64_LARGEFILE || FREEBSD
int
sys_ftruncate64(tcp)
struct tcb *tcp;
{
if (entering(tcp)) {
+ ALIGN64 (tcp, 1);
tprintf("%ld, %llu", tcp->u_arg[0],
get64(tcp->u_arg[1] ,tcp->u_arg[2]));
}
/*
- * Automatically generated by ./../syscalls.pl on Fri Sep 1 17:43:23 2000
+ * Automatically generated by ./../syscalls.pl on Wed Mar 7 12:22:58 2001
*/
{ 1, 0, sys_syscall, "syscall" }, /* 0 */
{ 3, TF, sys_chown, "chown" }, /* 16 */
{ 1, 0, sys_break, "break" }, /* 17 */
{ 3, 0, sys_getfsstat, "getfsstat" }, /* 18 */
- { 3, 0, sys_lseek, "lseek" }, /* 19 */
+ { 3, 0, sys_lseek64, "lseek" }, /* 19 */
{ 1, 0, sys_getpid, "getpid" }, /* 20 */
{ 4, TF, sys_mount, "mount" }, /* 21 */
{ 2, TF, sys_unmount, "unmount" }, /* 22 */
{ -1, 0, printargs, "SYS_68" }, /* 68 */
{ 1, 0, sys_sbrk, "sbrk" }, /* 69 */
{ 1, 0, sys_sstk, "sstk" }, /* 70 */
- { 6, 0, sys_mmap, "mmap" }, /* 71 */
+ { 6, 0, sys_mmap64, "mmap" }, /* 71 */
{ 1, 0, sys_vadvise, "vadvise" }, /* 72 */
{ 2, 0, sys_munmap, "munmap" }, /* 73 */
{ 3, 0, sys_mprotect, "mprotect" }, /* 74 */
{ 2, 0, sys_setreuid, "setreuid" }, /* 126 */
{ 2, 0, sys_setregid, "setregid" }, /* 127 */
{ 2, TF, sys_rename, "rename" }, /* 128 */
- { 2, TF, sys_truncate, "truncate" }, /* 129 */
- { 2, 0, sys_ftruncate, "ftruncate" }, /* 130 */
+ { 2, TF, sys_truncate64, "truncate" }, /* 129 */
+ { 2, 0, sys_ftruncate64, "ftruncate" }, /* 130 */
{ 2, 0, sys_flock, "flock" }, /* 131 */
{ 2, 0, sys_mkfifo, "mkfifo" }, /* 132 */
{ 6, TN, sys_sendto, "sendto" }, /* 133 */
{ 6, TI, sys_msgsys, "msgsys" }, /* 170 */
{ 4, TI, sys_shmsys, "shmsys" }, /* 171 */
{ -1, 0, printargs, "SYS_172" }, /* 172 */
- { 5, TF, sys_pread, "pread" }, /* 173 */
- { 5, TF, sys_pwrite, "pwrite" }, /* 174 */
+ { 5, TF, sys_pread64, "pread" }, /* 173 */
+ { 5, TF, sys_pwrite64, "pwrite" }, /* 174 */
{ -1, 0, printargs, "SYS_175" }, /* 175 */
{ 1, 0, sys_ntp_adjtime, "ntp_adjtime" }, /* 176 */
{ -1, 0, printargs, "SYS_177" }, /* 177 */
{ 2, 0, sys_getrlimit, "getrlimit" }, /* 194 */
{ 2, 0, sys_setrlimit, "setrlimit" }, /* 195 */
{ 4, 0, sys_getdirentries, "getdirentries" }, /* 196 */
- { 7, 0, sys_mmap, "mmap" }, /* 197 */
+ { 7, 0, sys_mmap64, "mmap" }, /* 197 */
{ 1, 0, sys___syscall, "__syscall" }, /* 198 */
- { 4, 0, sys_lseek, "lseek" }, /* 199 */
- { 3, TF, sys_truncate, "truncate" }, /* 200 */
- { 3, 0, sys_ftruncate, "ftruncate" }, /* 201 */
+ { 4, 0, sys_lseek64, "lseek" }, /* 199 */
+ { 3, TF, sys_truncate64, "truncate" }, /* 200 */
+ { 3, 0, sys_ftruncate64, "ftruncate" }, /* 201 */
{ 6, 0, sys___sysctl, "__sysctl" }, /* 202 */
{ 2, 0, sys_mlock, "mlock" }, /* 203 */
{ 2, 0, sys_munlock, "munlock" }, /* 204 */
{ 4, 0, sys___semctl, "__semctl" }, /* 220 */
{ 3, TI, sys_semget, "semget" }, /* 221 */
{ 3, TI, sys_semop, "semop" }, /* 222 */
- { 1, 0, sys_semconfig, "semconfig" }, /* 223 */
+ { -1, 0, printargs, "SYS_223" }, /* 223 */
{ 3, TI, sys_msgctl, "msgctl" }, /* 224 */
{ 2, TI, sys_msgget, "msgget" }, /* 225 */
{ 4, TI, sys_msgsnd, "msgsnd" }, /* 226 */
{ 2, 0, sys_aio_waitcomplete, "aio_waitcomplete" }, /* 359 */
{ 3, 0, sys_getresuid, "getresuid" }, /* 360 */
{ 3, 0, sys_getresgid, "getresgid" }, /* 361 */
+ { 1, 0, sys_kqueue, "kqueue" }, /* 362 */
+ { 6, 0, sys_kevent, "kevent" }, /* 363 */
return 0;
}
-#if defined(SVR4) || defined(FREEBSD)
+#if defined(SVR4)
int
sys_pread(tcp)
/* off_t is signed int */
tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
#else
-#ifndef FREEBSD
tprintf(", %lu, %llu", tcp->u_arg[2],
(((unsigned long long) tcp->u_arg[4]) << 32
| tcp->u_arg[3]));
-#else
- tprintf(", %lu, %llu", tcp->u_arg[2],
- (((off_t) tcp->u_arg[3]) << 32) + tcp->u_arg[4]);
-#endif
#endif
}
return 0;
/* off_t is signed int */
tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
#else
-#ifndef FREEBSD
tprintf(", %lu, %llu", tcp->u_arg[2],
(((unsigned long long) tcp->u_arg[4]) << 32
| tcp->u_arg[3]));
-#else
- tprintf(", %lu, %llu", tcp->u_arg[2],
- (((off_t) tcp->u_arg[3]) << 32) + tcp->u_arg[4]);
-#endif
#endif
}
return 0;
}
-#endif /* SVR4 || FREEBSD */
+#endif /* SVR4 */
#ifdef FREEBSD
#include <sys/types.h>
#endif /* LINUX */
-#if _LFS64_LARGEFILE
+#if _LFS64_LARGEFILE || FREEBSD
int
sys_pread64(tcp)
struct tcb *tcp;
if (entering(tcp)) {
tprintf("%ld, ", tcp->u_arg[0]);
} else {
+ ALIGN64 (tcp, 3);
if (syserror(tcp))
tprintf("%#lx", tcp->u_arg[1]);
else
printstr(tcp, tcp->u_arg[1], tcp->u_rval);
- tprintf(", %lu, %#llx", tcp->u_arg[2], get64(tcp->u_arg[3], tcp->u_arg[4]));
+ tprintf(", %lu, %#llx", tcp->u_arg[2],
+ get64(tcp->u_arg[3], tcp->u_arg[4]));
}
return 0;
}
struct tcb *tcp;
{
if (entering(tcp)) {
+ ALIGN64 (tcp, 3);
tprintf("%ld, ", tcp->u_arg[0]);
printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
- tprintf(", %lu, %#llx", tcp->u_arg[2], get64(tcp->u_arg[3], tcp->u_arg[4]));
+ tprintf(", %lu, %#llx", tcp->u_arg[2],
+ get64(tcp->u_arg[3], tcp->u_arg[4]));
}
return 0;
}