]> granicus.if.org Git - strace/commitdiff
The `too much stuff, just check the ChangeLog' update
authorWichert Akkerman <wichert@deephackmode.org>
Mon, 1 May 2000 01:53:59 +0000 (01:53 +0000)
committerWichert Akkerman <wichert@deephackmode.org>
Mon, 1 May 2000 01:53:59 +0000 (01:53 +0000)
20 files changed:
CREDITS
ChangeLog
TODO
defs.h
desc.c
file.c
linux/alpha/syscallent.h
linux/dummy.h
linux/ia64/syscallent.h
linux/mips/syscallent.h
linux/powerpc/syscallent.h
linux/sparc/syscallent.h
linux/syscallent.h
mem.c
process.c
signal.c
strace.c
syscall.c
system.c
term.c

diff --git a/CREDITS b/CREDITS
index 230b125d15d40cbe6136e760b2bb887fd6fbca04..4ff1bc87aea8aa6a05a76a576331b0ea0d392a78 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -30,7 +30,7 @@ porting to new systems:
        Richard Henderson <richard@twiddle.tamu.edu>
        Tom Dyas <tdyas@eden.rutgers.edu>
        Henrik Storner <storner@osiris.ping.dk>
-       David Mosberger-Tang <davidm@AZStarNet.com>
+       David Mosberger-Tang <davidm@hpl.hp.com>
        Ulrich Drepper <drepper@cygnus.com>
        Nate Eldredge <nate@cartsys.com>
        Jakub Jelinek <jj@ultra.linux.cz>
index 9f8bb9bb3c5f08a1159b5c2ec62a748db73a985f..62d5b75e0607a677ad29b4c9ff822a1172e9f4f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2000-04-26  Wichert Akkerman <wakkerma@debian.org>
+
+  * defs.h: balance #if/#endif again
+  * system.c: fix return statements in sys_capget()
+  * Merge updates from Topi Miettinen <Topi.Miettinen@nic.fi>:
+    + file.c: add F_[SG]ETSIG to fcntl flags
+    + strace.c: don't setre[gu]id if not needed
+    + system.c: handle sys_reboot for Linux
+    + term.c: add baudrate constants up to B4000000
+    + linux/**/syscallent.h: note that munlockall has no arguments
+
+2000-04-25  David Mosberger  <davidm@hpl.hp.com>
+
+  * CREDITS: fix email address
+  * process.c: handle PR_[GS]ET_UNALIGN and PR_[GS]ET_KEEPCAPS
+  * signal.c: honour offset of sigconfig in sigframe structure for
+    Linux/ia64
+  * linux/ia64/syscallent.h: Add perfmonctl, pivotroot, mincore, and
+    madvise syscalls.
+  * syscall.c (syscall_enter): With Kevin's latest ptrace patches,
+    AR_BSP points to the _end_ of the active register frame, so we need
+    to adjust bsp by moving it back by the size of the active frame
+    before using it.
+
+2000-04-24  Wichert Akkerman <wakkerma@debian.org>
+
+  * process.c: add sparc support to change_syscall
+
 2000-04-22  Wichert Akkerman <wakkerma@debian.org>
 
   * linux/mips/syscallent.h: fix some typos
@@ -51,7 +79,7 @@
 
 2000-02-03 Wichert Akkerman <wakkerma@debian.org>
 
-  * Merge Trillian (ia64) patches
+  * Merge Linux/ia64 patches
 
 2000-01-02 Pavel Machek             <pavel@ucw.cz>
 
diff --git a/TODO b/TODO
index c626bd6986312acabda610d52e1bbbbcabb0e9f2..65b882a9905fe1a2df41965acf3e237ca95a3f51 100644 (file)
--- a/TODO
+++ b/TODO
@@ -2,11 +2,11 @@
 * clone doesn't work; cloned processes can hang
 * partially done: finish up change_syscall using new setargs
 * do setargs for non-ia64
-* rename functions that are used for general things:
-  sys_chdir -> general_1stringarg
 * generate syscallent.h from the kernel sources (asm/unistd.h)
 * update linux/sparc syscall entries; Linux messed things up by overriding
   all kinds of SunOS entries
+* synchronize linux/**/syscallent.h, number of arguments for a syscal isn't
+  consistent across different architectures
 
 -- old entries from jrs
 attempt reopen of /proc file if we get EAGAIN from any /proc ioctl
diff --git a/defs.h b/defs.h
index 0a6bd639b8aed5d2ef401d3ec5ed701edc993d42..9b02bca41234ecee21fa459b89992e8488752b9a 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -44,6 +44,7 @@
 #else
 #define MAX_QUALS      2048    /* maximum number of syscalls, signals, etc. */
 #endif
+#endif
 #ifndef MAX_PROCS
 #define MAX_PROCS      64      /* maximum number of processes tracable */
 #endif
diff --git a/desc.c b/desc.c
index ce62d4e9475e0f6d8a5b39d5a7a6055878f525fa..539af8e1b7500fb30df401e65ac386969bb36896 100644 (file)
--- a/desc.c
+++ b/desc.c
@@ -57,6 +57,12 @@ static struct xlat fcntlcmds[] = {
 #endif
 #ifdef F_CNVT
        { F_CNVT,       "F_CNVT"        },
+#endif
+#ifdef F_SETSIG
+       { F_SETSIG,     "F_SETSIG"      },
+#endif
+#ifdef F_GETSIG
+       { F_GETSIG,     "F_GETSIG"      },
 #endif
        { 0,            NULL            },
 };
diff --git a/file.c b/file.c
index e4780b5fa3b71263e627346c01ce45583f0a6992..d92948a4a7f9e1ef72d86709f517fc5ee8a5ce49 100644 (file)
--- a/file.c
+++ b/file.c
@@ -172,13 +172,16 @@ struct xlat openmodes[] = {
        { O_PRIV,       "O_PRIV"        },
 #endif
 #ifdef O_DIRECT
-   { O_DIRECT, "O_DIRECT"  },
+       { O_DIRECT,     "O_DIRECT"      },
 #endif
 #ifdef O_LARGEFILE
-   { O_LARGEFILE,  "O_LARGEFILE"   },
+       { O_LARGEFILE,  "O_LARGEFILE"   },
 #endif
 #ifdef O_DIRECTORY
-   { O_DIRECTORY,  "O_DIRECTORY"   },
+       { O_DIRECTORY,  "O_DIRECTORY"   },
+#endif
+#ifdef O_NOFOLLOW
+       { O_NOFOLLOW,   "O_NOFOLLOW"    },
 #endif
 
 #ifdef FNDELAY
index ca033b5dd394384150ab2f6bb8986a46fe5dad4e..3c5d93de3be061ff809d992d17b7c81df5859b36 100644 (file)
        { 2,    0,      sys_mlock,              "mlock"                 }, /* 314 */
        { 2,    0,      sys_munlock,            "munlock"               }, /* 315 */
        { 1,    0,      sys_mlockall,           "mlockall"              }, /* 316 */
-       { 1,    0,      sys_munlockall,         "munlockall"            }, /* 317 */
+       { 0,    0,      sys_munlockall,         "munlockall"            }, /* 317 */
        { 1,    0,      sys_sysinfo,            "sysinfo"               }, /* 318 */
        { 1,    0,      sys_sysctl,             "sysctl"                }, /* 319 */
        { 0,    0,      sys_idle,               "idle"                  }, /* 320 */
index d3f27fca54953a4f1c30c17511065be0523e8958..cd6006bca3676f994a8263de0925bf3fc1ccd4df 100644 (file)
@@ -29,7 +29,6 @@
  */
 
 /* still unfinished */
-#define        sys_reboot              printargs
 #define        sys_ioperm              printargs
 #define        sys_syslog              printargs
 #define        sys_iopl                printargs
 #define        sys_init_module         printargs
 #define        sys_quotactl            printargs
 #define sys_mlockall           printargs
+#define        sys_reboot              printargs
 #endif
index 1094dcb6df592b13dfbb28fed630d20793029898..85bb3db65231504f6df5f65913417fce5d31c037 100644 (file)
        { 3,    0,      printargs,              "nfsservctl"    }, /* 169 */
        { 3,    0,      sys_setresgid,          "setresgid"     }, /* 170 */
        { 3,    0,      sys_getresgid,          "getresgid"     }, /* 171 */
-       { 5,    0,      printargs,              "prctl"         }, /* 172 */
+       { 5,    0,      sys_prctl,              "prctl"         }, /* 172 */
        { 1,    TS,     printargs,              "rt_sigreturn"  }, /* 173 */
        { 4,    TS,     sys_rt_sigaction,       "rt_sigaction"  }, /* 174 */
        { 4,    TS,     sys_rt_sigprocmask,     "rt_sigprocmask"}, /* 175 */
        { 2,    0,      sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 1167 */
        { 2,    0,      sys_nanosleep,          "nanosleep"     }, /* 1168 */
        { 3,    0,      printargs,              "nfsservctl"    }, /* 1169 */
-       { 5,    0,      printargs,              "prctl"         }, /* 1170 */
+       { 5,    0,      sys_prctl,              "prctl"         }, /* 1170 */
        { 1,    0,      sys_getpagesize,        "getpagesize"   }, /* 1171 */
        { 6,    0,      sys_mmap,               "mmap2"         }, /* 1172 */
        { 5,    0,      printargs,              "pciconfig_read"}, /* 1173 */
        { 5,    0,      printargs,              "pciconfig_write"}, /* 1174 */
-       { 8,    0,      printargs,              "SYS_1175"      }, /* 1175 */
+       { 8,    0,      printargs,              "perfmonctl"    }, /* 1175 */
        { 2,    TS,     sys_sigaltstack,        "sigaltstack"   }, /* 1176 */
        { 4,    TS,     sys_rt_sigaction,       "rt_sigaction"  }, /* 1177 */
        { 2,    TS,     sys_rt_sigpending,      "rt_sigpending" }, /* 1178 */
        { 4,    TS,     sys_rt_sigprocmask,     "rt_sigprocmask"}, /* 1179 */
        { 3,    TS,     sys_rt_sigqueueinfo,    "rt_sigqueueinfo"}, /* 1180 */
-       { 0,    TS,     printargs,              "rt_sigreturn"  }, /* 1181 */
+       { 0,    TS,     sys_sigreturn,          "rt_sigreturn"  }, /* 1181 */
        { 2,    TS,     sys_rt_sigsuspend,      "rt_sigsuspend" }, /* 1182 */
        { 4,    TS,     sys_rt_sigtimedwait,    "rt_sigtimedwait"}, /* 1183 */
        { 2,    TF,     sys_getcwd,             "getcwd"        }, /* 1184 */
        { 3,    TN,     sys_sendmsg,            "sendmsg"       }, /* 1205 */
        { 3,    TN,     sys_recvmsg,            "recvmsg"       }, /* 1206 */
        { 2,    TF,     sys_pivotroot,          "pivot_root"    }, /* 1207 */
-       { 8,    0,      printargs,              "SYS_1208"      }, /* 1208 */
-       { 8,    0,      printargs,              "SYS_1209"      }, /* 1209 */
+       { 3,    0,      printargs,              "mincore"       }, /* 1208 */
+       { 3,    0,      sys_madvise,            "madvise"       }, /* 1209 */
        { 8,    0,      printargs,              "SYS_1210"      }, /* 1210 */
        { 8,    0,      printargs,              "SYS_1211"      }, /* 1211 */
        { 8,    0,      printargs,              "SYS_1212"      }, /* 1212 */
index 7ffdd0b6da970fbef4825f6b612423d61fedf1b0..46fb6e3c4cec28924f04cc379d4364f707c2b783 100644 (file)
        { 5,    0,      sys_mlock,              "mlock"         }, /* 4154 */
        { 5,    0,      sys_munlock,            "munlock"       }, /* 4155 */
        { 5,    0,      sys_mlockall,           "mlockall"      }, /* 4156 */
-       { 5,    0,      sys_munlockall,         "munlockall"    }, /* 4157 */
+       { 0,    0,      sys_munlockall,         "munlockall"    }, /* 4157 */
        { 5,    0,      sys_sched_setparam,     "sched_setparam"}, /* 4158 */
        { 5,    0,      sys_sched_getparam,     "sched_getparam"}, /* 4159 */
        { 5,    0,      sys_sched_setscheduler, "sched_setscheduler"}, /* 4160 */
index a84161cd587a672ac8b8bb23d973076db3c8af39..49e7e12527fb18a25c46ddd06b1821d60b93b067 100644 (file)
        { 2,    0,      sys_mlock,              "mlock"                 }, /* 150 */
        { 2,    0,      sys_munlock,            "munlock"               }, /* 151 */
        { 1,    0,      sys_mlockall,           "mlockall"              }, /* 152 */
-       { 1,    0,      sys_munlockall,         "munlockall"            }, /* 153 */
+       { 0,    0,      sys_munlockall,         "munlockall"            }, /* 153 */
        { 2,    0,      sys_sched_setparam,     "sched_setparam"        }, /* 154 */ 
        { 2,    0,      sys_sched_getparam,     "sched_getparam"        }, /* 155 */ 
        { 3,    0,      sys_sched_setscheduler, "sched_setscheduler"    }, /* 156 */ 
index a200f330561bb2fe95a3da25d9f0b36f01fbbfc2..5a5716ebd5aa9715e1b1afa1c317c678897c38c3 100644 (file)
        { 5,    0,      sys_mlock,      "mlock" },              /* 237 */
        { 5,    0,      sys_munlock,    "munlock" },            /* 238 */
        { 5,    0,      sys_mlockall,   "mlockall" },           /* 239 */
-       { 5,    0,      sys_munlockall, "munlockall" },         /* 240 */
+       { 0,    0,      sys_munlockall, "munlockall" },         /* 240 */
        { 5,    0,      sys_sched_setparam,"sched_setparam"},   /* 241 */
        { 5,    0,      sys_sched_getparam,"sched_getparam"},   /* 242 */
 { 5,   0,      sys_sched_setscheduler,"sched_setscheduler"},   /* 243 */
index 97fa5c772e3a26522a244d3fe7d17945a85d414d..56948c56fd9418e59016200fc77a3c51d868dbb0 100644 (file)
        { 1,    0,      sys_mlock,              "mlock"         }, /* 150 */
        { 2,    0,      sys_munlock,            "munlock"       }, /* 151 */
        { 2,    0,      sys_mlockall,           "mlockall"      }, /* 152 */
-       { 1,    0,      sys_munlockall,         "munlockall"    }, /* 153 */
+       { 0,    0,      sys_munlockall,         "munlockall"    }, /* 153 */
        { 0,    0,      sys_sched_setparam,     "sched_setparam"}, /* 154 */
        { 2,    0,      sys_sched_getparam,     "sched_getparam"}, /* 155 */
        { 3,    0,      sys_sched_setscheduler, "sched_setscheduler"}, /* 156 */
diff --git a/mem.c b/mem.c
index 02c4f8b9da5203a70f57fb28aa5bada421e12e62..73a72fcc2a140ccf06fd6185ea50448d34f966a4 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -231,8 +231,8 @@ struct tcb *tcp;
 #ifdef LINUX
 
 static struct xlat mremap_flags[] = {
-       { MREMAP_MAYMOVE, "MREMAP_MAYMOVE" },
-       { 0,            NULL            }
+       { MREMAP_MAYMOVE,       "MREMAP_MAYMOVE"        },
+       { 0,                    NULL                    }
 };
 
 int
index f95e4ef7884e33ae756d8ba5c33ebdd2465a7a30..0a0f0a34dffc473fa565c7282632897d2c92ee2b 100644 (file)
--- a/process.c
+++ b/process.c
@@ -144,10 +144,45 @@ static struct xlat prctl_options[] = {
 #endif
 #ifdef PR_GET_PDEATHSIG
        { PR_GET_PDEATHSIG,     "PR_GET_PDEATHSIG"      },
+#endif
+#ifdef PR_GET_UNALIGN
+       { PR_GET_UNALIGN,       "PR_GET_UNALIGN"        },
+#endif
+#ifdef PR_SET_UNALIGN
+       { PR_SET_UNALIGN,       "PR_SET_UNALIGN"        },
+#endif
+#ifdef PR_GET_KEEPCAPS
+       { PR_GET_KEEPCAPS,      "PR_GET_KEEP_CAPS"      },
+#endif
+#ifdef PR_SET_KEEPCAPS
+       { PR_SET_KEEPCAPS,      "PR_SET_KEEP_CAPS"      },
 #endif
        { 0,                    NULL                    },
 };
 
+
+const char *
+unalignctl_string (unsigned int ctl)
+{
+       static char buf[16];
+
+       switch (ctl) {
+#ifdef PR_UNALIGN_NOPRINT
+             case PR_UNALIGN_NOPRINT:
+               return "NOPRINT";
+#endif
+#ifdef PR_UNALIGN_SIGBUS
+             case PR_UNALIGN_SIGBUS:
+               return "SIGBUS";
+#endif
+             default:
+               break;
+       }
+       sprintf(buf, "%x", ctl);
+       return buf;
+}
+
+
 int
 sys_prctl(tcp)
 struct tcb *tcp;
@@ -164,6 +199,16 @@ struct tcb *tcp;
 #ifdef PR_SET_DEATHSIG
                case PR_GET_PDEATHSIG:
                        break;
+#endif
+#ifdef PR_SET_UNALIGN
+               case PR_SET_UNALIGN:
+                       tprintf(", %s", unalignctl_string(tcp->u_arg[1]));
+                       break;
+#endif
+#ifdef PR_GET_UNALIGN
+               case PR_GET_UNALIGN:
+                       tprintf(", %#lx", tcp->u_arg[1]);
+                       break;
 #endif
                default:
                        for (i = 1; i < tcp->u_nargs; i++)
@@ -177,6 +222,20 @@ struct tcb *tcp;
                        for (i=1; i<tcp->u_nargs; i++)
                                tprintf(", %#lx", tcp->u_arg[i]);
                        break;
+#endif
+#ifdef PR_SET_UNALIGN
+               case PR_SET_UNALIGN:
+                       break;
+#endif
+#ifdef PR_GET_UNALIGN
+               case PR_GET_UNALIGN:
+               {
+                       int ctl;
+
+                       umove(tcp, tcp->u_arg[1], &ctl);
+                       tcp->auxstr = unalignctl_string(ctl);
+                       return RVAL_STR;
+               }
 #endif
                default:
                        break;
@@ -395,6 +454,14 @@ int new;
        if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_ORIG_D0), new)<0)
                return -1;
        return 0;
+#elif defined(SPARC)
+       struct pt_regs regs;
+       if (ptrace(PTRACE_GETREGS, tcp->pid, (char*)&regs, 0)<0)
+               return -1;
+       reg.r_g1=new;
+       if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)&regs, 0)<0)
+               return -1;
+       return 0;
 #elif defined(MIPS)
        if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), new)<0)
                return -1;
index ce090900d55912f5ebf8b88c9d0e2e4b4fd7a276..b786edf98d71d2702ddc4b44597d594775cd644f 100644 (file)
--- a/signal.c
+++ b/signal.c
@@ -752,19 +752,24 @@ struct tcb *tcp;
        long sp;
 
        if (entering(tcp)) {
+               /* offset of sigcontext in the kernel's sigframe structure: */
+#              define SIGFRAME_SC_OFFSET       0x90
                tcp->u_arg[0] = 0;
                if (upeek(tcp->pid, PT_R12, &sp) < 0)
                        return 0;
-               if (umove(tcp, sp + 16, &sc) < 0)
+               if (umove(tcp, sp + 16 + SIGFRAME_SC_OFFSET, &sc) < 0)
                        return 0;
                tcp->u_arg[0] = 1;
-               memcpy(tcp->u_arg + 1, &sc.sc_mask, sizeof(tcp->u_arg[1]));
+               memcpy(tcp->u_arg + 1, &sc.sc_mask, sizeof(sc.sc_mask));
        }
        else {
+               sigset_t sigm;
+
+               memcpy(&sigm, tcp->u_arg + 1, sizeof (sigm));
                tcp->u_rval = tcp->u_error = 0;
                if (tcp->u_arg[0] == 0)
                        return 0;
-               tcp->auxstr = sprintsigmask("mask now ", tcp->u_arg[1]);
+               tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
                return RVAL_NONE | RVAL_STR;
        }
        return 0;
index 761043224c505b5d2cc726ed1d9a6e0084a67b07..3c178ce2d3194f4fce488b6145c374eed1ba3816 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -439,18 +439,19 @@ char *argv[];
                                 * It is important to set groups before we
                                 * lose privileges on setuid.
                                 */
-                               if (username != NULL
-                                   && initgroups(username, run_gid) < 0) {
-                                       perror("initgroups");
-                                       exit(1);
-                               }
-                               if (setregid(run_gid, run_egid) < 0) {
-                                       perror("setregid");
-                                       exit(1);
-                               }
-                               if (setreuid(run_uid, run_euid) < 0) {
-                                       perror("setreuid");
-                                       exit(1);
+                               if (username != NULL) {
+                                       if (initgroups(username, run_gid) < 0) {
+                                               perror("initgroups");
+                                               exit(1);
+                                       }
+                                       if (setregid(run_gid, run_egid) < 0) {
+                                               perror("setregid");
+                                               exit(1);
+                                       }
+                                       if (setreuid(run_uid, run_euid) < 0) {
+                                               perror("setreuid");
+                                               exit(1);
+                                       }
                                }
                        }
                        else
index 47bf16d6fbfd126be156d92293d4c4d9414fc3ac..29a805e3b01995fb0f63a6b573b509a78ea8fc5f 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -775,7 +775,8 @@ struct tcb *tcp;
        scno = tcp->status.PR_WHAT;
 #endif /* !HAVE_PR_SYSCALL */
 #endif
-       tcp->scno = scno;
+       if (!(tcp->flags & TCB_INSYSCALL))
+               tcp->scno = scno;
        return 1;
 }
 
@@ -1074,10 +1075,14 @@ struct tcb *tcp;
        }
 #elif defined (IA64)
        {
-               unsigned long *bsp, i;
+               unsigned long *bsp, cfm, i;
 
                if (upeek(pid, PT_AR_BSP, (long *) &bsp) < 0)
                        return -1;
+               if (upeek(pid, PT_CFM, (long *) &cfm) < 0)
+                       return -1;
+
+               bsp = ia64_rse_skip_regs(bsp, -(cfm & 0x7f));
 
                tcp->u_nargs = sysent[tcp->scno].nargs;
                for (i = 0; i < tcp->u_nargs; ++i) {
index a99d445c0aae3fe9746598be4cfcd2e5f9d3ecbb..218e1379be6815083aed3285bfbb053f02b87538 100644 (file)
--- a/system.c
+++ b/system.c
@@ -68,9 +68,7 @@ struct pt_regs;
 #include <asm/cachectl.h>
 #endif
 
-#ifdef LINUX
 #include <linux/sysctl.h>
-#endif
 
 static struct xlat mount_flags[] = {
        { MS_RDONLY,    "MS_RDONLY"     },
@@ -158,6 +156,50 @@ struct tcb *tcp;
        return 0;
 }
 
+#include <linux/reboot.h>
+static struct xlat bootflags1[] = {
+       { LINUX_REBOOT_MAGIC1,  "LINUX_REBOOT_MAGIC1"   },
+       { 0,                    NULL                    },
+};
+
+static struct xlat bootflags2[] = {
+       { LINUX_REBOOT_MAGIC2,  "LINUX_REBOOT_MAGIC2"   },
+       { LINUX_REBOOT_MAGIC2A, "LINUX_REBOOT_MAGIC2A"  },
+       { LINUX_REBOOT_MAGIC2B, "LINUX_REBOOT_MAGIC2B"  },
+       { 0,                    NULL                    },
+};
+
+static struct xlat bootflags3[] = {
+       { LINUX_REBOOT_CMD_CAD_OFF,     "LINUX_REBOOT_CMD_CAD_OFF"      },
+       { LINUX_REBOOT_CMD_RESTART,     "LINUX_REBOOT_CMD_RESTART"      },
+       { LINUX_REBOOT_CMD_HALT,        "LINUX_REBOOT_CMD_HALT"         },
+       { LINUX_REBOOT_CMD_CAD_ON,      "LINUX_REBOOT_CMD_CAD_ON"       },
+       { LINUX_REBOOT_CMD_POWER_OFF,   "LINUX_REBOOT_CMD_POWER_OFF"    },
+       { LINUX_REBOOT_CMD_RESTART2,    "LINUX_REBOOT_CMD_RESTART2"     },
+       { 0,                            NULL                            },
+};
+
+int
+sys_reboot(tcp)
+struct tcb *tcp;
+{
+       if (entering(tcp)) {
+               if (!printflags(bootflags1, tcp->u_arg[0]))
+                       tprintf("LINUX_REBOOT_MAGIC???");
+               tprintf(", ");
+               if (!printflags(bootflags2, tcp->u_arg[1]))
+                       tprintf("LINUX_REBOOT_MAGIC???");
+               tprintf(", ");
+               if (!printflags(bootflags3, tcp->u_arg[2]))
+                       tprintf("LINUX_REBOOT_CMD_???");
+               if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
+                       tprintf(", ");
+                       printstr(tcp, tcp->u_arg[3], -1);
+               }
+       }
+       return 0;
+}
+
 #ifdef M68K
 static struct xlat cacheflush_scope[] = {
 #ifdef FLUSH_SCOPE_LINE
@@ -1409,14 +1451,14 @@ struct tcb *tcp;
                        if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
                                fprintf(stderr, "sys_capget: no memory\n");
                                tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-                               return;l
+                               return -1;
                        }
                }
                if (!arg1) {
                        if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
                                fprintf(stderr, "sys_capget: no memory\n");
                                tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-                               return;
+                               return -1;
                        }
                }
 
@@ -1461,14 +1503,14 @@ struct tcb *tcp;
                        if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
                                fprintf(stderr, "sys_capset: no memory\n");
                                tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-                               return;l
+                               return -1;
                        }
                }
                if (!arg1) {
                        if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
                                fprintf(stderr, "sys_capset: no memory\n");
                                tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-                               return;
+                               return -1;
                        }
                }
 
diff --git a/term.c b/term.c
index e60f0ed3ba5f3948a1aea7227753f4b10de9ca42..4cf10a925c3be890128d7ec7c1f155a1dfcb2c67 100644 (file)
--- a/term.c
+++ b/term.c
@@ -75,6 +75,51 @@ static struct xlat baud_options[] = {
 #ifdef B38400
        { B38400,       "B38400"        },
 #endif
+#ifdef B57600
+       { B57600,       "B57600"        },
+#endif
+#ifdef B115200
+       { B115200,      "B115200"       },
+#endif
+#ifdef B230400
+       { B230400,      "B230400"       },
+#endif
+#ifdef B460800
+       { B460800,      "B460800"       },
+#endif
+#ifdef B500000
+       { B500000,      "B500000"       },
+#endif
+#ifdef B576000
+       { B576000,      "B576000"       },
+#endif
+#ifdef B921600
+       { B921600,      "B921600"       },
+#endif
+#ifdef B1000000
+       { B1000000,     "B1000000"      },
+#endif
+#ifdef B1152000
+       { B1152000,     "B1152000"      },
+#endif
+#ifdef B1500000
+       { B1500000,     "B1500000"      },
+#endif
+#ifdef B2000000
+       { B2000000,     "B2000000"      },
+#endif
+#ifdef B2500000
+       { B2500000,     "B2500000"      },
+#endif
+#ifdef B3000000
+       { B3000000,     "B3000000"      },
+#endif
+#ifdef B3500000
+       { B3500000,     "B3500000"      },
+#endif
+#ifdef B4000000
+       { B4000000,     "B4000000"      },
+#endif
 #ifdef EXTA
        { EXTA,         "EXTA"          },
 #endif