summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2002-12-15 23:58:23 +0000
committerRoland McGrath <roland@redhat.com>2002-12-15 23:58:23 +0000
commit186c5acdb9af627e0844cf82ed68d0da6dbe13de (patch)
treeaeb1804e63ade08e3aacaac93d84b5543fcca642 /io.c
parent67ecd63d02c1b692477f8006b7ee0c0165df332b (diff)
downloadstrace-186c5acdb9af627e0844cf82ed68d0da6dbe13de.tar.gz
strace-186c5acdb9af627e0844cf82ed68d0da6dbe13de.tar.bz2
strace-186c5acdb9af627e0844cf82ed68d0da6dbe13de.tar.xz
2002-12-15 Roland McGrath <roland@redhat.com>
* configure.in: Check for linux/xattr.h and linux/futex.h headers. * linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg, readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity, sched_getaffinity, futex. * linux/syscallent.h: Update the table. * io.c: Add sys_sendfile64. * file.c: Add sys_readahead, sys_*xattr. * process.c: Add sys_futex, sys_*affinity.
Diffstat (limited to 'io.c')
-rw-r--r--io.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/io.c b/io.c
index 3bb7798..471879c 100644
--- a/io.c
+++ b/io.c
@@ -89,7 +89,7 @@ long addr;
tprintf("[]");
return;
}
-
+
if ((iov = (struct iovec *) malloc(len * sizeof *iov)) == NULL) {
fprintf(stderr, "No memory");
return;
@@ -280,6 +280,25 @@ struct tcb *tcp;
return 0;
}
+int
+sys_sendfile64(tcp)
+struct tcb *tcp;
+{
+ if (entering(tcp)) {
+ loff_t offset;
+
+ tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
+ if (!tcp->u_arg[2])
+ tprintf("NULL");
+ else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
+ tprintf("%#lx", tcp->u_arg[2]);
+ else
+ tprintf("[%llu]", (unsigned long long int) offset);
+ tprintf(", %lu", tcp->u_arg[3]);
+ }
+ return 0;
+}
+
#endif /* LINUX */
#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
@@ -315,7 +334,7 @@ struct tcb *tcp;
return 0;
}
#endif
-
+
int
sys_ioctl(tcp)
struct tcb *tcp;