Commit Graph

8 Commits

Author SHA1 Message Date
84a979c9ee Fix explicit casts of signed integer types to unsigned long long
* defs.h (widen_to_ull): New macro.
* dirent.c (print_old_dirent, SYS_FUNC(getdents)): Use it in place
of explicit casts to unsigned long long.
* io.c (print_lld_from_low_high_val): Likewise.
* lseek.c (SYS_FUNC(llseek)): Likewise.
* printsiginfo.c (print_si_info): Likewise.
* printstat.h (DO_PRINTSTAT): Likewise.
* sysinfo.c (SYS_FUNC(sysinfo)): Likewise.
* times.c (SYS_FUNC(times)): Likewise.
* fetch_struct_statfs.c (ASSIGN_NUMBER): Remove.
(fetch_struct_statfs, fetch_struct_statfs64): Replace ASSIGN_NUMBER
with widen_to_ull.
2016-05-26 14:44:13 +00:00
ddbede5d9c Print offsets in lseek and _llseek syscalls as signed integers
* lseek.c (SYS_FUNC(lseek)): Print offset using %lld format.
(SYS_FUNC(llseek)): Likewise.  Treat high and low components of offset
as unsigned long integers.
* tests/llseek.c (main): Check that negative offset is printed properly.
* tests/lseek.c (main): Likewise.
2016-02-16 01:35:36 +00:00
38a34c9349 Add copyright headers to some files which lack them
Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't.  This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained.  In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
2015-12-17 17:56:48 +00:00
a5aa080ae6 x32: fix decoding of i386 personality lseek syscall
On x32, tcp->ext_arg is not initialized for i386 personality,
so tcp->u_arg has to be used instead.

* lseek.c (SYS_FUNC(lseek)) [X32]: Handle "current_personality == 1" case.
2015-12-04 16:42:30 +00:00
ed88a50630 lseek.c: make use of RVAL_DECODED
* lseek.c (sys_lseek): Update for RVAL_DECODED.
2015-07-20 01:42:01 +00:00
7db808d749 lseek.c: use printnum_int64
* lseek.c (sys_llseek): Use printnum_int64.
2015-07-20 01:42:01 +00:00
a0bd3749fc Declare syscall parsers using SYS_FUNC macro
Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
2015-04-07 11:22:49 +00:00
b5d25ec2f9 file.c: move lseek and llseek parsers to a separate file
* lseek.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* file.c: Move sys_lseek, sys_llseek, and related code to lseek.c.
2014-12-11 21:40:11 +00:00