120 Commits

Author SHA1 Message Date
Roland McGrath
1025c3ed7f 2005-04-25 Anton Blanchard <anton@samba.org>
* file.c (openmodes): Add O_NOATIME flag if defined.
2005-05-09 07:40:35 +00:00
Roland McGrath
f774642aa4 2005-03-01 Roland McGrath <roland@redhat.com>
* file.c (print_xattr_val): Add a cast.
2005-03-01 23:02:32 +00:00
Roland McGrath
663a8a065c 2005-02-04 Roland McGrath <roland@redhat.com>
* file.c (O_LARGEFILE): Omit when #undef'd because it was zero.
2005-02-04 09:49:56 +00:00
Roland McGrath
fee836eb65 2005-02-02 Roland McGrath <roland@redhat.com>
* file.c (openmodes) [O_LARGEFILE] [O_LARGEFILE == 0]: Redefine to
	known values for Linux.
2005-02-02 22:11:32 +00:00
Roland McGrath
883567c1cc 2005-02-01 Roland McGrath <roland@redhat.com>
* file.c (print_xattr_val): Don't use auto array sized by syscall
	argument.  Use malloc instead, so it can fail for insane values.
	Fixes Debian bug #283704.
2005-02-02 03:38:32 +00:00
Roland McGrath
e27ed3426d 2004-10-19 Roland McGrath <roland@redhat.com>
* file.c (sys_fadvise64): Conditionalize just on [LINUX].
2004-10-20 02:24:19 +00:00
Roland McGrath
8c304bcc00 2004-10-19 Roland McGrath <roland@redhat.com>
* file.c (sys_llseek): Revert last change.
2004-10-19 22:59:55 +00:00
Roland McGrath
2fe2a3e124 2004-10-07 Roland McGrath <roland@redhat.com>
* file.c (sys_llssek, sys_readahead, sys_fadvise64, sys_fadvise64_64):
	Use LONG_LONG macro.
	* io.c (sys_pread, sys_pwrite, sys_sendfile): Likewise.
2004-10-07 19:09:16 +00:00
Roland McGrath
df13e8f4ca 2004-10-07 Roland McGrath <roland@redhat.com>
* file.c [LINUX && (I386 || X86_64)] (sys_fadvise64, sys_fadvise64_64):
	New functions.
	* linux/syscall.h: Declare them.
	* linux/syscallent.h: Handle fadvise64 and fadvise64_64 using those.
	From Ulrich Drepper <drepper@redhat.com>.
2004-10-07 18:51:19 +00:00
Roland McGrath
f9c49b24dc 2004-10-06 Roland McGrath <roland@redhat.com>
* file.c (sprintmode): Add const to return type.
	(sprintfstype): Likewise.
	* signal.c (printsiginfo): Add a const.
2004-10-06 22:11:54 +00:00
Roland McGrath
d9f816f604 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.
2004-09-04 03:39:20 +00:00
Roland McGrath
3292e229b9 2004-08-30 Roland McGrath <roland@redhat.com>
* file.c (print_xattr_val): New function to show attribute values.
	(sys_setxattr, sys_fsetxattr, sys_getxattr, sys_fgetxattr): Use it.
	From Ulrich Drepper <drepper@redhat.com>.
	Fixes RH#131177.
2004-08-31 06:30:48 +00:00
Roland McGrath
6d1a65c759 2004-07-07 David S. Miller <davem@nuts.davemloft.net>
* linux/sparc/syscallent.h: Sync with reality.
	* linux/sparc/syscall.h (sys_sendfile64, sys_futex, sys_gettid,
	sys_sched_setaffinity, sys_sched_getaffinity, sys_setxattr,
	sys_lsetxattr, sys_fsetxattr, sys_getxattr, sys_lgetxattr,
	sys_fgetxattr, sys_listxattr, sys_llistxattr, sys_flistxattr,
	sys_removexattr, sys_lremovexattr, sys_fremovexattr,
	sys_remap_file_pages, sys_readahead, sys_tgkill, sys_statfs64,
	sys_fstatfs64, sys_clock_settime, sys_clock_gettime,
	sys_clock_getres, sys_clock_nanosleep, sys_timer_create,
	sys_timer_settime, sys_timer_gettime): New declarations.
	* linux/sparc64/dummy2.h, linux/sparc64/syscallent2.h,
	linux/sparc64/syscall.h, linux/sparc64/errnoent.h,
	linux/sparc64/errnoent1.h, linux/sparc64/errnoent2.h,
	linux/sparc64/ioctlent.h, linux/sparc64/ioctlent1.h,
	linux/sparc64/ioctlent2.h, linux/sparc64/signalent.h,
	linux/sparc64/signalent.h, linux/sparc64/signalent.h,
	linux/sparc64/signalent1.h, linux/sparc64/signalent2.h,
	linux/sparc64/syscall1.h, linux/sparc64/syscallent.h,
	linux/sparc64/syscallent1.h: New files.
	* defs.h (LINUXSPARC): Define also when SPARC64.
	(LINUX && SPARC64): Set SUPPORTED_PERSONALITIES to 3.
	Ignore SIGTRAP after execve by defining TCB_WAITEXECVE.
	Define possibly missing __NR_exit_group.  Declare getrval2.
	* configure.ac (sparc64): New architecture case.
	* config.h.in (SPARC64): New define.
	* file.c (stat_sparc64): New structure.
	(printstat_sparc64): New output routine for that.
	(printstat): Call it, if personality is 2.
	(printstat64): Likewise.
	* util.c: Conditionalize ptrace defines on LINUXSPARC
	not LINUX && SPARC.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(_hack_syscall5): Correct trap number when SPARC64.
	(PTRACE_WRITE{TEXT,DATA}): Add SPARC64 to ifdef guard.
	(getpc): Handle SPARC64 && LINUX.
	(printcall): Likewise.
	(arg fetching/setting): Use same code for SPARC64 LINUX
	as for SPARC.
	(setbpt): Handle SPARC64 && LINUX.
	(clearbpt): Likewise.
	* signal.c: Conditionalize ptrace defines on SPARC and
	SPARC64.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(m_siginfo): Use same definition on SPARC64 as SPARC.
	(sys_sigreturn): Handle LINUX && SPARC64.
	* syscall.c: Conditionalize ptrace defines on SPARC and
	SPARC64.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(getscno): Use same static state on SPARC64 as SPARC,
	and add SPARC64 handling.
	(get_error): Handle LINUX && SPARC64.
	(force_result): Likewise.
	(syscall_enter): Likewise.
	(trace_syscall): Handle sys_socketcall and sys_ipc on SPARC64
	just like SPARC.
	(getrval2): Handle LINUX && SPARC64.
	* process.c: Conditionalize ptrace defines on SPARC and
	SPARC64.
	(SPARC64 && LINUX): Define r_pc to r_tpc, and PTRACE_FOOREGS
	to PTRACE_FOOREGS64 so that more sparc code can be shared
	between 64-bit and 32-bit.
	(change_syscall): Handle LINUX && SPARC64.
	(struct_user_offsets): Ifdef out those which do not exist
	on SPARC64.
	* net.c (sys_pipe): Handle LINUX && SPARC64.
	* ioctl.c: Fix initializer typo for nioctlents2, was
	nioctlents1 by accident.
2004-07-12 07:44:08 +00:00
Roland McGrath
9205324e8b 2003-12-14 Anton Blanchard <anton@samba.org>
* file.c (sys_getdents64): Don't cast d_ino and d_off to unsigned long.
	Use %llu formats for them.
2004-01-13 10:16:47 +00:00
Roland McGrath
c767ad8e1a 2003-12-14 Anton Blanchard <anton@samba.org>
* file.c [LINUX] (fsmagic): Add SYSFS_MAGIC.
2004-01-13 10:13:45 +00:00
Roland McGrath
4054284e29 2004-01-13 Roland McGrath <roland@redhat.com>
* file.c (direnttypes): Define under [LINUX] as well.  Add DT_UNKNOWN.
	(sys_getdents64) [LINUX]: Print d_type field.
2004-01-13 09:47:49 +00:00
Roland McGrath
6bc1220fe3 2003-09-06 Dmitry V. Levin <ldv@altlinux.org>
* util.c (printuid): New function.
	* defs.h: Declare it.
	* file.c (sys_chown): Use it.
	* file.c (sys_fchown): Likewise.
	* process.c (sys_setreuid, sys_setregid, sys_setresuid,
	sys_setresgid): Likewise.
2003-11-13 22:32:27 +00:00
Roland McGrath
ab147c5d67 2003-07-17 Roland McGrath <roland@redhat.com>
* linux/syscallent.h: Handle statfs64, fstatfs64, utimes.
	* file.c (printstatfs): Print f_fsid and f_frsize.
	[LINUX] (printstatfs64, sys_statfs64, sys_fstatfs64): New functions.
	* linux/syscall.h: Add decls.
	From Ulrich Drepper <drepper@redhat.com>.
2003-07-17 09:03:02 +00:00
Roland McGrath
79db8af777 2003-06-27 Roland McGrath <roland@redhat.com>
* configure.ac: Check for type `struct __old_kernel_stat'.
	* file.c (convertoldstat, printoldstat): Define under
	[LINUX && HAVE_STRUCT___OLD_KERNEL_STAT] rather than a list of archs.
	(sys_oldstat, sys_oldfstat, sys_oldlstat): Likewise.
	* linux/dummy.h [! HAVE_STRUCT___OLD_KERNEL_STAT]
	(sys_oldstat, sys_oldfstat, sys_oldlstat): #define to printargs.
2003-06-27 21:20:09 +00:00
Roland McGrath
561c7995d7 2003-04-01 Philippe De Muyter <phdm@macqel.be>
* sock.c, stream.c: Check #ifdef LINUX, not linux.
	* file.c: Always provide sys_*attr, regardless of #ifdef XATTR_CREATE.
2003-04-02 01:10:44 +00:00
Roland McGrath
ca16a404e2 2003-01-08 Roland McGrath <roland@redhat.com>
* file.c [LINUX]: #undef st_[amc]time in case they are macros.
2003-01-09 06:53:22 +00:00
Roland McGrath
6d2b34971b 2002-12-22 Roland McGrath <roland@redhat.com>
Update to Autoconf 2.57, and Automakify with version 1.7.
	* Makefile.am: New file.
	* Makefile.in: File removed.
	* configure.in: Moved to ...
	* configure.ac: ... here.  Update for Autoconf 2.5x and Automake.
	* aclocal.m4: Moved to ...
	* acinclude.m4: ... here.  Update for Autoconf 2.5x.
	* AUTHORS: New file, makes automake happy.
	* autogen.sh: File removed.
	* README-CVS: Update to recommend autoreconf instead.
	* file.c: HAVE_ST_* -> HAVE_STRUCT_STAT_ST_*.
	* net.c: HAVE_SIN6_SCOPE_ID -> HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID,
	HAVE_MSG_CONTROL -> HAVE_STRUCT_MSGHDR_MSG_CONTROL.
	* strace.c: *_DECLARED -> HAVE_DECL_*
	* stream.c: HAVE_* -> HAVE_STRUCT_*
2002-12-30 00:51:30 +00:00
Roland McGrath
186c5acdb9 2002-12-15 Roland McGrath <roland@redhat.com>
* configure.in: Check for linux/xattr.h and linux/futex.h headers.
	* linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg,
	readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int
	listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity,
	sched_getaffinity, futex.
	* linux/syscallent.h: Update the table.
	* io.c: Add sys_sendfile64.
	* file.c: Add sys_readahead, sys_*xattr.
	* process.c: Add sys_futex, sys_*affinity.
2002-12-15 23:58:23 +00:00
Michal Ludvig
10a88d09eb 2002-10-07 Michal Ludvig <mludvig@suse.cz>
Merged s390x port by Heiko Carstens <Heiko.Carstens@de.ibm.com>
        and bugfixes to s390 by D.J. Barrow.
2002-10-07 14:31:00 +00:00
Michal Ludvig
0e035502d2 2002-09-23 Michal Ludvig <mludvig@suse.cz>
Merged x86-64 port by Andi Kleen <ak@suse.de>
	and Michal Ludvig <mludvig@suse.cz>
	* Makefile.in: New target 'headers'. Failure ignored.
	* acconfig.h: New defines for x86-64.
	* configure.in: Ditto.
	* defs.h: Ditto.
	* file.c: Ditto.
	* signal.c: Ditto.
	* process.c: Added support for x86-64.
	* util.c: Ditto.
	* syscall.c: Ditto + added automatic personality switching.
	* linux/syscall.h: Ditto.
	* linux/x86_64: New directory.
	* linux/x86_64/Makefile.in: New file.
	* linux/x86_64/gentab.pl: Ditto.
	* linux/x86_64/i386-headers.diff: Ditto.
	* linux/x86_64/makeheaders.sh: Ditto.
	* linux/x86_64/syscallent.h: Ditto.
	* mem.c (print_mmap): Always print arg[4] as int.
2002-09-23 15:41:01 +00:00
Michal Ludvig
53b320f61f 2002-09-23 Michal Ludvig <mludvig@suse.cz>
* configure.in: Fix regular expressions.
	* linux/syscall.h: Added missing braces in prototype of
	sys_getdents64().
	* file.c: Use '#ifdef LINUX' instead of '#ifdef linux'.
	(struct fileflags): Made extern to inhibit compiation warnings.
	(sys_getdents64): Merged LINUX and SVR4 part.
	* syscall.c(get_scno): Split multiline string into two distinct
	strings.
2002-09-23 13:30:09 +00:00
Wichert Akkerman
7ab47b63e3 Fix signed/unsigned problems 2002-03-31 19:00:02 +00:00
Wichert Akkerman
7b3346be42 Import lots of ia64 related changes from David Mosberger 2001-10-09 23:47:38 +00:00
Wichert Akkerman
c1652e2095 Add Linux/hppa port, patch from Richard Hirst 2001-03-27 12:17:16 +00:00
John Hughes
c0fc3fd077 replace some #if FREEBSD by #if HAVE_ST_xxx 2001-03-08 16:10:40 +00:00
John Hughes
0c79e01d74 replace wimpy get64 by powerful LONG_LONG :-) 2001-03-08 14:40:06 +00:00
John Hughes
70623be853 Use configure to detect 64bit off_t and rlim_t 2001-03-08 13:59:00 +00:00
John Hughes
b8c9f77c6d FreeBSD uses 64 bit off_t, fix stat&fcntl(flock) 2001-03-07 16:53:07 +00:00
John Hughes
e2f6d87d58 add missing bit of solaris patches 2001-03-07 16:03:20 +00:00
John Hughes
5a826b8427 Fix off_t args on FreeBSD 2001-03-07 13:21:24 +00:00
John Hughes
96f5147037 Implement truncate64 & ftruncate64 for them that wants 'em 2001-03-06 16:50:41 +00:00
John Hughes
bdf48f55f2 Merge Harald Bhme's solaris patches 2001-03-06 15:08:09 +00:00
John Hughes
8fe2c98986 fix stat64 on UW 2001-03-06 09:45:18 +00:00
Wichert Akkerman
9b0c31d663 process.c: perform bpt trick for clone as well so we can get the pid of the child before it starts doing something
file.c: rename dirent64 struct to kernel_dirent64 so things compile again with newer libcs
2000-09-03 21:56:29 +00:00
Wichert Akkerman
bf79f2e16b Add FreeBSD support 2000-09-01 21:03:06 +00:00
Wichert Akkerman
d077c451cd Handle change in Linux 2.4.0-test6 stat structure 2000-08-10 18:16:15 +00:00
Wichert Akkerman
16a03d2e97 test/clone.c: minor fixup
Another bunch of patches from John Hughes merged:
signal.c:
+ SVR4 printcontext(): sigset_t != sigset_t*
+ getcontext returns a value, so print on exit of syscall
+ add UC_FP to ucontext_flags for OS writers that can't spell
+ sys_signal(): special case SIG_{ERR,DFL,IGN}
+ decode_subcall(): only do subcall range checking when needed
bunch of UnixWare updates
aclocal.m4, acconfig.h, configure.in: add test for long long type
2000-08-10 02:14:04 +00:00
Wichert Akkerman
43a7482edb Merge changes from Ulrich 2000-06-27 17:33:32 +00:00
Wichert Akkerman
5ae21ead9f The `too much stuff, just check the ChangeLog' update 2000-05-01 01:53:59 +00:00
Wichert Akkerman
c792698a99 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
2000-04-10 22:22:31 +00:00
Wichert Akkerman
8b1b40cd8b Merge Trillian patches (Linux ia64) 2000-02-03 21:58:30 +00:00
Pavel Machek
9a9f10b4fc Wrap changing of syscall into nice function.
Warn instead of infinite loop in case of error.
2000-02-01 16:22:52 +00:00
Wichert Akkerman
3ed6dc2491 Add 1900 to tm_year in sprinttime 2000-01-11 14:41:09 +00:00
Wichert Akkerman
0396bdc0a7 Use STAT64 test for the new stat64 functions 1999-12-24 23:11:57 +00:00
Ulrich Drepper
7f02c4d53f Implement sys_stat64, sys_fstat64, sys_lstat64, and printstat64. 1999-12-24 08:01:34 +00:00