summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-02-17 13:17:49 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-02-17 13:17:49 +0100
commit09a87ae9712acb3725fb76d3f71215e168215611 (patch)
tree3bdbe689d0cf133477ec5b4d06369c4bfabb1615 /file.c
parent782d90f9187e290f4523efe04a6e0eacdeb68613 (diff)
downloadstrace-09a87ae9712acb3725fb76d3f71215e168215611.tar.gz
strace-09a87ae9712acb3725fb76d3f71215e168215611.tar.bz2
strace-09a87ae9712acb3725fb76d3f71215e168215611.tar.xz
Remove wrong x32-specific lseek
Testing confirmed what I suspected: x32 lseek uses kernel-sized (i.e. wide) long for offset parameter. * file.c: Delete sys_lseek32. * linux/syscall.h: Likewise. * linux/x32/syscallent1.h: Likewise. * test/x32_lseek.c: New file. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'file.c')
-rw-r--r--file.c26
1 files changed, 3 insertions, 23 deletions
diff --git a/file.c b/file.c
index 3a98674..e535448 100644
--- a/file.c
+++ b/file.c
@@ -528,6 +528,7 @@ static const struct xlat whence_codes[] = {
* In kernel, off_t is always the same as (kernel's) long
* (see include/uapi/asm-generic/posix_types.h),
* which means that on x32 we need to use tcp->ext_arg[N] to get offset argument.
+ * Use test/x32_lseek.c to test lseek decoding.
*/
#if defined(LINUX_MIPSN32) || defined(X32)
int
@@ -548,27 +549,6 @@ sys_lseek(struct tcb *tcp)
}
return RVAL_LUDECIMAL;
}
-
-# if defined(X32)
-int
-sys_lseek32(struct tcb *tcp)
-{
- long offset;
- int whence;
-
- if (entering(tcp)) {
- printfd(tcp, tcp->u_arg[0]);
- offset = tcp->u_arg[1];
- whence = tcp->u_arg[2];
- if (whence == SEEK_SET)
- tprintf(", %lu, ", offset);
- else
- tprintf(", %ld, ", offset);
- printxval(whence_codes, whence, "SEEK_???");
- }
- return RVAL_UDECIMAL;
-}
-# endif
#else
int
sys_lseek(struct tcb *tcp)
@@ -598,9 +578,9 @@ sys_lseek(struct tcb *tcp)
*
* hi,lo are "unsigned longs" and combined exactly this way in kernel:
* ((loff_t) hi << 32) | lo
- * Note that for architectures with kernel's long wider than userspace longs
+ * Note that for architectures with kernel's long wider than userspace long
* (such as x32), combining code will use *kernel's*, i.e. *wide* longs
- * for hi and lo. You may need to use tcp->ext_arg[N]!
+ * for hi and lo. We may need to use tcp->ext_arg[N]!
*/
int
sys_llseek(struct tcb *tcp)