From: Wichert Akkerman Date: Sun, 18 Apr 1999 23:30:29 +0000 (+0000) Subject: Update linux sparc support so it compiles and works reasonably X-Git-Tag: v4.5.18~1214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4d8e92b30dc9d776066965375a1f392f2d209ab;p=strace Update linux sparc support so it compiles and works reasonably --- diff --git a/ChangeLog b/ChangeLog index edcdf4cb..8a5ab448 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Sun Apr 18 22:32:42 CEST 1999 Wichert Akkerman * Update syscalls for linux alpha, patch from Bart Warmerdam + * Update sparc code so it actually compiles Fri Apr 16 02:18:05 CEST 1999 Wichert Akkerman diff --git a/TODO b/TODO index 4767f414..18824be9 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,8 @@ +-- new entries from wta +getdents has wrong structure; track down kernel version + + +-- old entries from jrs require override to run suid and/or sgid executables normally attempt reopen of /proc file if we get EAGAIN from any /proc ioctl kill procs we error out of on svr4 diff --git a/file.c b/file.c index 9040ebfe..449077d7 100644 --- a/file.c +++ b/file.c @@ -33,13 +33,21 @@ #include -#ifdef linux -#define stat libc_stat -#include -#undef stat -#include +#ifdef LINUXSPARC +# include +# define stat libc_stat +# include +# undef stat +#elif defined(linux) +# define stat libc_stat +# include +# undef stat +# include +# include +#else +# include #endif -#include + #include #ifdef SVR4 @@ -1233,12 +1241,6 @@ struct tcb *tcp; tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]); return 0; } -#ifdef linux -#ifdef __sparc__ - tprintf (" = Unknown value\n"); - return 0; -#endif -#endif len = tcp->u_rval; if ((buf = malloc(len)) == NULL) { tprintf("out of memory\n"); diff --git a/linux/sparc/syscallent.h b/linux/sparc/syscallent.h index 4be6d5e2..3b85e1cc 100644 --- a/linux/sparc/syscallent.h +++ b/linux/sparc/syscallent.h @@ -203,7 +203,7 @@ { 5, 0, printargs, "sgetmask" }, /* 199 */ { 5, 0, printargs, "ssetmask" }, /* 200 */ { 3, TS, sys_sigsuspend, "sigsuspend" }, /* 201 */ - { 2, TF, sys_oldlstat, "oldlstat" }, /* 202 */ + { 2, TF, sys_lstat, "lstat" }, /* 202 */ { 1, TF, sys_uselib, "uselib" }, /* 203 */ { 3, 0, sys_readdir, "readdir" }, /* 204 */ { 3, 0, sys_ioperm, "ioperm" }, /* 205 */ @@ -212,7 +212,7 @@ { 1, 0, sys_olduname, "olduname" }, /* 208 */ { 1, 0, sys_iopl, "iopl" }, /* 209 */ { 0, 0, sys_idle, "idle" }, /* 210 */ - { 1, 0, sys_vm86, "vm86" }, /* 211 */ + { 1, 0, sys_vm86old, "vm86" }, /* 211 */ { 3, TP, sys_waitpid, "waitpid" }, /* 212 */ { 1, 0, sys_swapoff, "swapoff" }, /* 213 */ { 1, 0, sys_sysinfo, "sysinfo" }, /* 214 */ @@ -233,10 +233,10 @@ { 1, 0, sys_setfsgid, "setfsgid" }, /* 229 */ { 5, 0, printargs, "_newselect" }, /* 230 */ { 1, 0, sys_time, "time" }, /* 231 */ - { 2, TF, sys_oldstat, "oldstat" }, /* 232 */ + { 2, TF, printargs, "nis_syscall" }, /* 232 */ { 1, 0, sys_stime, "stime" }, /* 233 */ - { 2, 0, sys_oldfstat, "oldfstat" }, /* 234 */ - { 0, 0, sys_phys, "phys" }, /* 235 */ + { 2, 0, printargs, "nis_syscall" }, /* 234 */ + { 2, 0, printargs, "nis_syscall" }, /* 235 */ { 5, 0, printargs, "_llseek" }, /* 236 */ { 5, 0, sys_mlock, "mlock" }, /* 237 */ { 5, 0, sys_munlock, "munlock" }, /* 238 */ @@ -255,9 +255,9 @@ { 5, 0, sys_sysctl, "_sysctl" }, /* 251 */ { 5, 0, sys_getsid, "getsid" }, /* 252 */ { 5, 0, sys_fdatasync, "fdatasync" }, /* 253 */ - { 5, 0, printargs, "SYS_254" }, /* 254 */ - { 5, 0, printargs, "SYS_255" }, /* 255 */ - { 5, 0, printargs, "SYS_256" }, /* 256 */ + { 5, 0, printargs, "nfsservctl" }, /* 254 */ + { 5, 0, printargs, "aplib" }, /* 255 */ + { 5, 0, printargs, "nis_syscall" }, /* 256 */ { 5, 0, printargs, "SYS_257" }, /* 257 */ { 5, 0, printargs, "SYS_258" }, /* 258 */ { 5, 0, printargs, "SYS_259" }, /* 259 */ diff --git a/stream.c b/stream.c index 4c632f30..f242b638 100644 --- a/stream.c +++ b/stream.c @@ -29,9 +29,9 @@ #include "defs.h" -#if defined(HAVE_SYS_STREAM_H) || defined(LINUXSPARC) || defined(linux) +#if defined(HAVE_SYS_STREAM_H) || defined(linux) -#if defined(LINUXSPARC) || defined(linux) +#if defined(linux) #include #define RS_HIPRI 1 @@ -43,7 +43,7 @@ struct strbuf { #define MORECTL 1 #define MOREDATA 2 -#else /* LINUXSPARC */ +#else /* linux */ #include #include @@ -51,7 +51,7 @@ struct strbuf { #include #include -#endif /* LINUXSPARC */ +#endif /* linux */ #ifdef HAVE_SYS_TIUSER_H #include @@ -64,13 +64,6 @@ static struct xlat msgflags[] = { { 0, NULL }, }; -#if 0 -static struct xlat getmsgflags[] = { - { MORECTL, "MORECTL" }, - { MOREDATA, "MOREDATA" }, - { 0, NULL }, -}; -#endif static void printstrbuf(tcp, sbp, getting) @@ -256,7 +249,6 @@ struct tcb *tcp; #endif /* HAVE_PUTPMSG */ -#if !defined(LINUXSPARC) static struct xlat pollflags[] = { { POLLIN, "POLLIN" }, @@ -819,4 +811,3 @@ int code, arg; #endif /* LINUXSPARC && linux */ -#endif /* HAVE_SYS_STREAM_H */