History log of /external/strace/resource.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0ed617bd66624cec6138102545d73b2e2346f1f6 26-Apr-2014 Dmitry V. Levin <ldv@altlinux.org> Generate xlat/*.in files

Automatically convert xlat structures from *.c files to xlat/*.in files
using "./generate_xlat_in.sh *.c" command.
/external/strace/resource.c
3b09ebe724b1ee233ce2314a8b70a4dfdf9d2b07 02-May-2014 James Hogan <james.hogan@imgtec.com> Fix {get,set}rlimit decoding with unreliable SIZEOF_RLIM_T

When strace is built with large file support definitions in CFLAGS (as
may be provided by buildroot) the C library headers may expose a 64-bit
rlim_t even though the struct rlimit fields used by the system call
interface are only 32-bit. The SIZEOF_RLIM_T will then be 8 which
results in bad decoding of the getrlimit and setrlimit syscalls.

This is fixed by replacing unreliable SIZEOF_RLIM_T based checks with
checks for current_wordsize.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
/external/strace/resource.c
594527353359d9a6aad516992e09c393e11f3bd2 05-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Use XLAT_END macro

Automatically update all xlat structures using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*0[[:space:]]*,[[:space:]]*NULL[[:space:]]*,\?[[:space:]]*}[[:space:]]*,\?[[:space:]]*/\tXLAT_END/
/external/strace/resource.c
bce0cc6a2d103e1da4c15a4c5396fdc5676294f7 05-Feb-2014 Dmitry V. Levin <ldv@altlinux.org> Use XLAT macro

Automatically convert all xlat structures to XLAT form
using the following sed regexp:
s/^[[:space:]]*{[[:space:]]*\([^",}[:space:]]\+\)[[:space:]]*,[[:space:]]*"\1",\?[[:space:]]*}[[:space:]]*/\tXLAT(\1)/
/external/strace/resource.c
e015d2d331c75b912e3dd96532e2c31ae0e06554 15-Feb-2013 Denys Vlasenko <vda.linux@googlemail.com> Macroize conditional signed widening operation

* defs.h: Define widen_to_long() macro.
* signal.c (sys_kill): Use it instead of open-coding it.
(sys_tgkill): Use widen_to_long() on pids.
* resource.c (decode_rlimit): Formatting fix.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
2bb4581ee501f6803df258ebb74c63a18a48422b 15-Apr-2012 H.J. Lu <hongjiu.lu@intel.com> Cast clock_t type to unsigned long long

* resource.c (sys_times): Cast clock_t type to unsigned long long.
* signal.c (printsiginfo): Likewise.
/external/strace/resource.c
61d62cf9481f100f76f1e8a2dfe131f638566633 16-Apr-2012 Denys Vlasenko <vda.linux@googlemail.com> Stop using %h[h]u format specifiers

This is needed for simplified printf, and reduces code size a bit.

* block.c (block_ioctl): Cast the value to unsinged and use %u
instead of using %hu.
* desc.c (sys_io_cancel): Likewise.
* resource.c (sys_sysinfo): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
9fd4f96d2a2527ac7ca90c156bfc11ce10118684 19-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Optimize code if we have only one personality

On i386:
text data bss dec hex filename
238025 672 18980 257677 3ee8d strace.before
237389 704 18944 257037 3ec0d strace

* defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined.
Introduce new define, current_wordsize as
(personality_wordsize[current_personality]).
Make set_personality() no-op, current_personality constant zero,
current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality.
* count.c (call_summary): Use current_wordsize instead of
personality_wordsize[current_personality].
* desc.c (printflock): Likewise.
* file.c (sys_utime): Likewise.
* io.c (tprint_iov): Likewise.
* process.c (printargv): Likewise.
* resource.c (decode_rlimit): Likewise.
* signal.c (sys_kill): Likewise.
(sys_rt_sigaction): Likewise.
* time.c (sprinttv): Likewise.
(sprint_timespec): Likewise.
(printitv_bitness): Likewise.
(tprint_timex): Likewise.
(printsigevent): Likewise.
* util.c (dumpiov): Likewise.
(umoven): Likewise.
(umovestr): Likewise.
* syscall.c: Initialize sysent to sysent0 etc.
Make current_personality, personality_wordsize[], set_personality()
conditional on SUPPORTED_PERSONALITIES > 1.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
b468f2320a8b8e245b481c78b58431ac56505849 16-Mar-2012 Dmitry V. Levin <ldv@altlinux.org> Implement prlimit64 decoding, rewrite [gs]etrlimit decoding

* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
Define SIZEOF_RLIM_T.
* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
* linux/dummy.h (sys_prlimit64): Remove.
* linux/syscall.h (sys_prlimit64): New prototype.
* resource.c (resources): Reindent, add RLIMIT_RTTIME.
(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
sys_prlimit64): New functions.
/external/strace/resource.c
a6d91ded3f2d5401e09a9c2fa442aabfbfe593a8 16-Mar-2012 Denys Vlasenko <vda.linux@googlemail.com> Tidy up includes and copyright notices, fix indentation

The files not mentioned in changelog below had only
copyright notices fixes and indentation fixes.

* defs.h: Include <stdint.h> and <inttypes.h>.
* file.c: Do not include <inttypes.h>.
Move struct kernel_dirent declaration below top include block.
* block.c: Do not include <stdint.h> and <inttypes.h>.
* quota.c: Likewise.
* desc.c: Likewise.
* signal.c: Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
1945ccc3fbd5b56008c4a6b0cdd4611616201675 27-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Assorted trivial optimizations

text data bss dec hex filename
236448 672 19044 256164 3e8a4 strace.before
236360 672 19044 256076 3e84c strace

* file.c (sprintmode): Use smaller static buffer, eliminate strlen call.
(sprinttime): Use smaller static buffer.
(printstat_sparc64): Coalesce two printing calls into one.
(printstat_powerpc32): Likewise.
(printcompat_statfs6): Likewise.
(sys_utime): Do not fetch personality_wordsize[current_personality]
repeatedly - cache it in local variable instead.
* process.c (printargv): Likewise.
* resource.c (sprintrlim): Return const char*, not char*. This allows
to eliminate sprintf(buf, "RLIM_INFINITY"). Use smaller static buffer.
(sprintrlim64): Likewise.
* strace.c (strerror): Use smaller static buffer.
(strsignal): Likewise.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
72879c6a35cd5afa7f58ee7bc32e4dcd8e65bd9a 27-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Alias a few more syscall printing functions

text data bss dec hex filename
237384 672 19044 257100 3ec4c strace.before
236448 672 19044 256164 3e8a4 strace

* defs.h: Declare new functions printargs_lu(), printargs_ld()
which simply print syscall all args as unsigned or signed longs.
* desc.c (sys_epoll_create): Call printargs_ld() instead of open-coding it.
* linux/syscall.h: Remove declarations of the following functions:
sys_alarm, sys_getresgid, sys_getsid, sys_nice, sys_setgid, sys_setpgid,
sys_setpgrp, sys_setregid, sys_setresgid.
* process.c (sys_setgid): Delete this function: now aliased to sys_setuid().
(sys_getresgid): Delete this function: now aliased to sys_getresuid().
(sys_setregid): Delete this function: now aliased to sys_setreuid().
(sys_setresgid): Delete this function: now aliased to sys_setresuid().
(sys_setpgrp): Delete this function: now aliased to printargs_lu().
(sys_getsid): Likewise.
(sys_setpgid): Likewise.
(sys_alarm): Likewise.
(sys_getpgrp): Delete this function: was unused - was already shadowed
by a define in linux/dummy.h.
(sys_setsid): Likewise.
(sys_getpgid): Likewise.
* resource.c (sys_nice): Delete this function: now aliased to printargs_ld().
* linux/dummy.h: Define new aliases (see above for the list).
* syscall.c (printargs_lu): New function.
(printargs_ld): New function.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
e83e157021177930b64ec4aa4983bbe13b39e91b 25-Feb-2012 Dmitry V. Levin <ldv@altlinux.org> Compress blank lines

Suppress repeated empty lines left after automated code removal.
This change was made by filtering every source code file through
"cat -s".
/external/strace/resource.c
aa925db23634fe6a2c1d4b47accb3649daf1b781 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Remove a few more code parts which are unused on Linux

This change is abapted from Dmitry's changes to remove support for
non-Linux architectures.

* Makefile.am: Remove if LINUX/endif pairs.
* defs.h: Remove stream_ioctl() declaration.
* ioctl.c (ioctl_decode): Remove 'ifdef HAVE_SYS_STREAM_H' block.
* resource.c: Use 'defined(FOO)' instead of 'defined FOO' form.
* util.c: Likewise.
* signal.c: Remove conditional includes which are never used on Linux.
* stream.c: Likewise.
* file.c: Remove excessive empty lines.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
1a3cf10c3095a9f80138b83f3d54499b825c9797 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Build fixes after non-Linux code removal

* configure.ac: Remove calls to proc-based ptrace checks.
* proc.c: Remove, it's empty now.
* Makefile.am: Remove reference to proc.c.
* net.c: Remove trailing newlines.
* quota.c: Likewise
* resource.c: Likewise
* strace.c: Likewise
* stream.c: Likewise
* time.c: Likewise

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
8470374cba7df0e70653d95c4f336a4082c68d82 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Cleanup after non-Linux code removal.

Conditions such as defined(LINUX) are always true now,
defined(FREEBSD) etc are always false.
When if directive has them as subexpressions, it can be simplified.
Another trivial changes here are fixes for directive indentation.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
ed720fda5d515f1359fcd3242223e553d1216789 25-Feb-2012 Denys Vlasenko <vda.linux@googlemail.com> Automated removal of non-Linux code

This change is generated by running every source through the following command:

unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD
-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS
-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
/external/strace/resource.c
d602542f16d628e719a7a9c5cbf7c45f7d7e0ceb 03-Feb-2012 H.J. Lu <hongjiu.lu@intel.com> Define RLIM64_INFINITY only if not defined

* resource.c (RLIM64_INFINITY): Define only if it isn't defined.
/external/strace/resource.c
0b315b65432cda20c7e5608c5124289036522fa7 03-Feb-2012 H.J. Lu <hongjiu.lu@intel.com> Cast to long for %l in printf

Cast a value to long for %l in printf to avoid compiler warning
on systems where it may be long long.

* count.c (call_summary_pers): Cast to long.
* ipc.c (sys_mq_open, printmqattr): Likewise.
* quota.c (decode_cmd_data): Likewise.
* resource.c (sys_sysinfo): Likewise.
* time.c (tprint_timex): Likewise.
/external/strace/resource.c
60fe8c139c6f2febefe595781812ddf0864a6ab8 01-Sep-2011 Denys Vlasenko <dvlasenk@redhat.com> Use tprints with literal strings, it may be faster than tprintf

* bjm.c: Replace tprintf("str") with tprints("str").
* block.c: Likewise.
* desc.c: Likewise.
* file.c: Likewise.
* io.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* quota.c: Likewise.
* resource.c: Likewise.
* scsi.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* strace.c: Likewise.
* stream.c: Likewise.
* syscall.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/resource.c
ee81c8a57177ad6db9e5fae1666a7a996f90f159 03-Jul-2010 Andreas Schwab <schwab@linux-m68k.org> Handle biarch get/setrlimit

* resource.c (print_rlimit32) [POWERPC64 || X86_64]: Define.
(sys_getrlimit, sys_setrlimit) [POWERPC64 || X86_64]: Use it.
/external/strace/resource.c
1d632468c09756d3382d1a92f99a8413636e75d3 14-Apr-2009 Denys Vlasenko <dvlasenk@redhat.com> * signal.c: Whitespace, comment, and style fixes, no code changes.
* file.c: Ditto.
* time.c: Ditto.
* process.c: Ditto.
* resource.c: Ditto.
/external/strace/resource.c
59432dbb333959618b5afdb9a7513d1ab0289a14 26-Jan-2009 Denys Vlasenko <dvlasenk@redhat.com> * process.c (printwaitn): Add comment about wait4() pid expansion.
Use #ifdef ALPHA instead of LINUX_64BIT, it was misleading
(by implying "any 64-bit platform").
* defs.h: Remove now-unused LINUX_64BIT define.
* resource.c (sys_osf_getrusage): Fix indentation.
/external/strace/resource.c
ef5c3d657dee362898d84e697efea4a5e48a7b96 16-Oct-2006 Dmitry V. Levin <ldv@altlinux.org> 2006-10-16 Dmitry V. Levin <ldv@altlinux.org>

Implement comprehensive quotactl(2) parser for Linux.
* Makefile.am (strace_SOURCES): Add quota.c.
* quota.c: New file.
* resource.c: Remove old quotactl(2) parser.
Fixes RH#118696.
/external/strace/resource.c
70d9909b9e43f9de697a4e9616eadc3577fec9fa 02-Dec-2005 Roland McGrath <roland@redhat.com> 2005-12-01 Roland McGrath <roland@redhat.com>

* resource.c (resources): Add RLIMIT_NICE, RLIMIT_RTPRIO.
Reported by Scott Tsai <scottt958@yahoo.com.tw>.
/external/strace/resource.c
be4d9f8b98e3b6910a3a8a580bbd421f086c7ffd 03-Aug-2005 Roland McGrath <roland@redhat.com> 2005-08-03 Roland McGrath <roland@redhat.com>

* configure.ac: Check for struct dqblk.dqb_curblocks field.
* resource.c [LINUX] (OLD_CMD): New macro.
(quotacmds): Use it to hard-wire old O_* values, don't use macros.
(sys_quotactl): If dqb_curblocks is not there, it's called
dqb_curspace instead. Print dqb_* fields as unsigned long long.
/external/strace/resource.c
e806ac29eef0c848b54532ac4c5a9d8e2e2c4208 03-Aug-2005 Roland McGrath <roland@redhat.com> 2005-08-03 Roland McGrath <roland@redhat.com>

* resource.c [LINUX] (OLD_CMD): New macro.
(quotacmds): Use it to hard-wire old O_* values, don't use macros.
/external/strace/resource.c
566ce1fc6269266422490ead5ecfa8c6fd5e090c 07-Oct-2004 Roland McGrath <roland@redhat.com> 2004-10-06 Roland McGrath <roland@redhat.com>

* resource.c (resources): Add RLIMIT_LOCKS, RLIMIT_SIGPENDING,
and RLIMIT_MSGQUEUE, if defined.
From Ulrich Drepper <drepper@redhat.com>.
Fixes RH#133594.
/external/strace/resource.c
d9f816f60457930af27349fac3d23b3b78338036 04-Sep-2004 Roland McGrath <roland@redhat.com> 2004-09-03 Roland McGrath <roland@redhat.com>

* util.c (xlookup, printxval, addflags, printflags): Use const for
struct xlat * argument.
* defs.h (xlookup, printxval, addflags, printflags): Update decls.
* bjm.c: Add const to all struct xlat defns.
* desc.c: Likewise.
* file.c: Likewise.
* ipc.c: Likewise.
* mem.c: Likewise.
* net.c: Likewise.
* proc.c: Likewise.
* process.c: Likewise.
* resource.c: Likewise.
* signal.c: Likewise.
* sock.c: Likewise.
* stream.c: Likewise.
* system.c: Likewise.
* term.c: Likewise.
* time.c: Likewise.
* util.c: Likewise.
/external/strace/resource.c
9f09da616af8b6b2d5be0af53cdc5bc093036ee0 08-Jul-2004 Roland McGrath <roland@redhat.com> 2004-07-08 Roland McGrath <roland@redhat.com>

* resource.c (sys_quotactl): Truncate first argument to 32 bits, since
that's what the kernel will do.
/external/strace/resource.c
1a3d60e1fc08d23194dd735c70c5984c69c4f948 16-Apr-2004 Roland McGrath <roland@redhat.com> 2004-03-18 Dmitry V. Levin <ldv@altlinux.org>

* resource.c (sys_quotactl) [LINUX]: Cast arithmetic shift operand
from long to unsigned long, to fix output of the quotactl command
parser.
/external/strace/resource.c
1919161d41d51c0e15276f756ea716dec3142036 15-Jan-2003 Roland McGrath <roland@redhat.com> 2003-01-14 Roland McGrath <roland@redhat.com>

* resource.c [LINUX] (quotacmds): Grok new command encodings.
From Nathan Scott <nathans@debian.org>.
/external/strace/resource.c
7b3346be42d6a1f539e95d385ee498f8b3c529f8 10-Oct-2001 Wichert Akkerman <wichert@deephackmode.org> Import lots of ia64 related changes from David Mosberger
/external/strace/resource.c
70623be853b5524d87d980ac3d611b11890800ea 08-Mar-2001 John Hughes <john@Calva.COM> Use configure to detect 64bit off_t and rlim_t
/external/strace/resource.c
bdf48f55f264a9cd2eb1b3cac8f1f87c1acad008 06-Mar-2001 John Hughes <john@Calva.COM> Merge Harald B�hme's solaris patches
/external/strace/resource.c
bf79f2e16b090ffe59cd1e1820935680a2da7b78 01-Sep-2000 Wichert Akkerman <wichert@deephackmode.org> Add FreeBSD support
/external/strace/resource.c
c792698a99b640e7d256e8692c992bd967f0c5b2 11-Apr-2000 Wichert Akkerman <wichert@deephackmode.org> README-linux: updated to note that strace might not compile
with development kernels
bjm.c: sys_query_module: check if malloc succeeds
system.c: sys_cap[gs]et(): check if malloc succeeds, only malloc once
linux/syscallent.h: updated for 2.3.99pre3
linux/alpha/syscallent.h: updated for 2.3.99pre3, add all osf syscalls
even though Linux doesn't implement them
syscall.c: add global variables for MIPS registers as well
syscall.c: move global variables to before get_scno since that uses them
util.c: oops, misspelled defined
process.c: fix ptrace calls in change_syscall
mem.c: decode sys_madvise
Merge patch from Topi Miettinen <Topi.Miettinen@nic.fi>
+ add support for quotactl, fdatasync, mlock, mlockall, munlockall & acct
+ small fix for RLIMIT_* and RUSAGE_BOTH
+ enhace support for capget and capset
/external/strace/resource.c
4dc8a2aec63e4fb5ee2688544c4de323ed5de3ef 23-Dec-1999 Wichert Akkerman <wichert@deephackmode.org> Bunch of stuff
/external/strace/resource.c
f5eeabb156641482abd504fb98b039e1aae4ae87 18-Nov-1999 Wichert Akkerman <wichert@deephackmode.org> Start merging linux-ip-routing fork
/external/strace/resource.c
76baf7c9f6dd61a15524ad43c1b690c252cf5b7c 19-Feb-1999 Wichert Akkerman <wichert@deephackmode.org> Initial revision
/external/strace/resource.c