lseek: simplify _llseek syscall decoder
After transition from long to kernel_ulong_t the implementation could be made a bit simpler. * lseek.c (SYS_FUNC(llseek)): Use direct cast to long long instead of zero_extend_signed_to_ull.
This commit is contained in:
parent
b6351bc2ce
commit
5477470e9c
7
lseek.c
7
lseek.c
@ -75,16 +75,15 @@ SYS_FUNC(lseek)
|
||||
* ((loff_t) hi << 32) | lo
|
||||
* 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. We would need to use tcp->ext_arg[N] on x32...
|
||||
* ...however, x32 (and x86_64) does not _have_ llseek syscall as such.
|
||||
* for hi and lo.
|
||||
*/
|
||||
SYS_FUNC(llseek)
|
||||
{
|
||||
if (entering(tcp)) {
|
||||
printfd(tcp, tcp->u_arg[0]);
|
||||
tprintf(", %lld, ",
|
||||
(zero_extend_signed_to_ull(tcp->u_arg[1]) << 32)
|
||||
| zero_extend_signed_to_ull(tcp->u_arg[2]));
|
||||
((long long) tcp->u_arg[1] << 32)
|
||||
| ((long long) tcp->u_arg[2]));
|
||||
} else {
|
||||
printnum_int64(tcp, tcp->u_arg[3], "%" PRIu64);
|
||||
tprints(", ");
|
||||
|
Loading…
Reference in New Issue
Block a user