summaryrefslogtreecommitdiff
path: root/io.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2012-02-04 15:17:43 +0000
committerDmitry V. Levin <ldv@altlinux.org>2012-02-04 15:17:43 +0000
commit309edeb2e1907d662330ec1b14290ab609e4d112 (patch)
treeeff907243e8a6ffb839f76fd29a735dda55d9802 /io.c
parentcdab1becb03eeae442719027fc26a17da464e5de (diff)
downloadstrace-309edeb2e1907d662330ec1b14290ab609e4d112.tar.gz
strace-309edeb2e1907d662330ec1b14290ab609e4d112.tar.bz2
strace-309edeb2e1907d662330ec1b14290ab609e4d112.tar.xz
Remove unused sys_pread64 and sys_pwrite64 parsers on Linux
* io.c [HAVE_LONG_LONG_OFF_T]: Remove sys_pread64 and sys_pwrite64 aliases. (sys_pread64, sys_pwrite64): Define these functions only on [SVR4 && _LFS64_LARGEFILE] platform. * linux/mips/syscallent.h: Use sys_pread and sys_pwrite to handle appropriate syscalls. * linux/syscall.h (sys_pread64, sys_pwrite64): Remove. * syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only on [SVR4 && _LFS64_LARGEFILE] platform.
Diffstat (limited to 'io.c')
-rw-r--r--io.c74
1 files changed, 33 insertions, 41 deletions
diff --git a/io.c b/io.c
index acc5bb5..c3075aa 100644
--- a/io.c
+++ b/io.c
@@ -37,15 +37,6 @@
#include <sys/uio.h>
#endif
-#ifdef HAVE_LONG_LONG_OFF_T
-/*
- * Hacks for systems that have a long long off_t
- */
-
-#define sys_pread64 sys_pread
-#define sys_pwrite64 sys_pwrite
-#endif
-
int
sys_read(struct tcb *tcp)
{
@@ -218,6 +209,39 @@ sys_pwrite(struct tcb *tcp)
}
return 0;
}
+
+#if _LFS64_LARGEFILE
+int
+sys_pread64(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ } else {
+ if (syserror(tcp))
+ tprintf("%#lx", tcp->u_arg[1]);
+ else
+ printstr(tcp, tcp->u_arg[1], tcp->u_rval);
+ tprintf(", %lu, ", tcp->u_arg[2]);
+ printllval(tcp, "%#llx", 3);
+ }
+ return 0;
+}
+
+int
+sys_pwrite64(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ printfd(tcp, tcp->u_arg[0]);
+ tprints(", ");
+ printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+ tprintf(", %lu, ", tcp->u_arg[2]);
+ printllval(tcp, "%#llx", 3);
+ }
+ return 0;
+}
+#endif /* _LFS64_LARGEFILE */
+
#endif /* SVR4 */
#ifdef FREEBSD
@@ -463,38 +487,6 @@ sys_vmsplice(struct tcb *tcp)
}
#endif /* LINUX */
-#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
-int
-sys_pread64(struct tcb *tcp)
-{
- if (entering(tcp)) {
- printfd(tcp, tcp->u_arg[0]);
- tprints(", ");
- } else {
- if (syserror(tcp))
- tprintf("%#lx", tcp->u_arg[1]);
- else
- printstr(tcp, tcp->u_arg[1], tcp->u_rval);
- tprintf(", %lu, ", tcp->u_arg[2]);
- printllval(tcp, "%#llx", 3);
- }
- return 0;
-}
-
-int
-sys_pwrite64(struct tcb *tcp)
-{
- if (entering(tcp)) {
- printfd(tcp, tcp->u_arg[0]);
- tprints(", ");
- printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
- tprintf(", %lu, ", tcp->u_arg[2]);
- printllval(tcp, "%#llx", 3);
- }
- return 0;
-}
-#endif
-
int
sys_ioctl(struct tcb *tcp)
{