diff options
author | Wichert Akkerman <wichert@deephackmode.org> | 1999-05-09 00:29:58 +0000 |
---|---|---|
committer | Wichert Akkerman <wichert@deephackmode.org> | 1999-05-09 00:29:58 +0000 |
commit | 2e2553a534f532a1546ea2b2f3dc3cd2276d020d (patch) | |
tree | 6cffd996287d564f4365dd0b13e1fd9abe33c186 /system.c | |
parent | 022c52fda19fa3e92a7000b239214fdd57248a4b (diff) | |
download | strace-2e2553a534f532a1546ea2b2f3dc3cd2276d020d.tar.gz strace-2e2553a534f532a1546ea2b2f3dc3cd2276d020d.tar.bz2 strace-2e2553a534f532a1546ea2b2f3dc3cd2276d020d.tar.xz |
Merged in a bunch of patches that I got as reaction to the 3.99 release.
See the ChangeLog for details
Diffstat (limited to 'system.c')
-rw-r--r-- | system.c | 53 |
1 files changed, 52 insertions, 1 deletions
@@ -45,8 +45,9 @@ #include <netinet/in.h> #include <arpa/inet.h> -#ifdef LINUX +#ifdef __NR_personality /* Workaround for kernel namespace pollution. */ +#define _LINUX_PTRACE_H #define sys_personality kernel_sys_personality #include <linux/personality.h> #undef sys_personality @@ -56,6 +57,10 @@ #include <linux/capability.h> #endif +#ifdef __NR_cacheflush +#include <asm/cachectl.h> +#endif + static struct xlat mount_flags[] = { { MS_RDONLY, "MS_RDONLY" }, { MS_NOSUID, "MS_NOSUID" }, @@ -127,6 +132,52 @@ struct tcb *tcp; return 0; } +#ifdef M68K +static struct xlat cacheflush_scope[] = { +#ifdef FLUSH_SCOPE_LINE + { FLUSH_SCOPE_LINE, "FLUSH_SCOPE_LINE" }, +#endif +#ifdef FLUSH_SCOPE_PAGE + { FLUSH_SCOPE_PAGE, "FLUSH_SCOPE_PAGE" }, +#endif +#ifdef FLUSH_SCOPE_ALL + { FLUSH_SCOPE_ALL, "FLUSH_SCOPE_ALL" }, +#endif + { 0, NULL }, +}; + +static struct xlat cacheflush_flags[] = { +#ifdef FLUSH_CACHE_BOTH + { FLUSH_CACHE_BOTH, "FLUSH_CACHE_BOTH" }, +#endif +#ifdef FLUSH_CACHE_DATA + { FLUSH_CACHE_DATA, "FLUSH_CACHE_DATA" }, +#endif +#ifdef FLUSH_CACHE_INSN + { FLUSH_CACHE_INSN, "FLUSH_CACHE_INSN" }, +#endif + { 0, NULL }, +}; + +int +sys_cacheflush(tcp) +struct tcb *tcp; +{ + if (entering(tcp)) { + /* addr */ + tprintf("%#lx, ", tcp->u_arg[0]); + /* scope */ + printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???"); + tprintf(", "); + /* flags */ + printflags(cacheflush_flags, tcp->u_arg[2]); + /* len */ + tprintf(", %lu", tcp->u_arg[3]); + } + return 0; +} +#endif /* M68K */ + #endif /* LINUX */ #ifdef SUNOS4 |