summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/brand/lx/lx_syscall.h47
-rw-r--r--usr/src/common/util/getresponse.c2
2 files changed, 45 insertions, 4 deletions
diff --git a/usr/src/common/brand/lx/lx_syscall.h b/usr/src/common/brand/lx/lx_syscall.h
index e80b0486f5..e9d06fd9bc 100644
--- a/usr/src/common/brand/lx/lx_syscall.h
+++ b/usr/src/common/brand/lx/lx_syscall.h
@@ -35,9 +35,6 @@ extern "C" {
#define LX_WNOTHREAD 0x20000000 /* Do not wait on siblings' children */
#define LX_WALL 0x40000000 /* Wait on all children */
#define LX_WCLONE 0x80000000 /* Wait only on clone children */
-typedef struct lx_waitid_args {
- int waitid_flags;
-} lx_waitid_args_t;
/* For arch_prctl(2) */
#define LX_ARCH_SET_GS 0x1001
@@ -45,6 +42,50 @@ typedef struct lx_waitid_args {
#define LX_ARCH_GET_FS 0x1003
#define LX_ARCH_GET_GS 0x1004
+/*
+ * For ptrace(2):
+ */
+#define LX_PTRACE_TRACEME 0
+#define LX_PTRACE_PEEKTEXT 1
+#define LX_PTRACE_PEEKDATA 2
+#define LX_PTRACE_PEEKUSER 3
+#define LX_PTRACE_POKETEXT 4
+#define LX_PTRACE_POKEDATA 5
+#define LX_PTRACE_POKEUSER 6
+#define LX_PTRACE_CONT 7
+#define LX_PTRACE_KILL 8
+#define LX_PTRACE_SINGLESTEP 9
+#define LX_PTRACE_GETREGS 12
+#define LX_PTRACE_SETREGS 13
+#define LX_PTRACE_GETFPREGS 14
+#define LX_PTRACE_SETFPREGS 15
+#define LX_PTRACE_ATTACH 16
+#define LX_PTRACE_DETACH 17
+#define LX_PTRACE_GETFPXREGS 18
+#define LX_PTRACE_SETFPXREGS 19
+#define LX_PTRACE_SYSCALL 24
+#define LX_PTRACE_SETOPTIONS 0x4200
+#define LX_PTRACE_GETEVENTMSG 0x4201
+
+/*
+ * For clone(2):
+ */
+#define LX_CSIGNAL 0x000000ff
+#define LX_CLONE_VM 0x00000100
+#define LX_CLONE_FS 0x00000200
+#define LX_CLONE_FILES 0x00000400
+#define LX_CLONE_SIGHAND 0x00000800
+#define LX_CLONE_PID 0x00001000
+#define LX_CLONE_PTRACE 0x00002000
+#define LX_CLONE_VFORK 0x00004000
+#define LX_CLONE_PARENT 0x00008000
+#define LX_CLONE_THREAD 0x00010000
+#define LX_CLONE_SYSVSEM 0x00040000
+#define LX_CLONE_SETTLS 0x00080000
+#define LX_CLONE_PARENT_SETTID 0x00100000
+#define LX_CLONE_CHILD_CLEARTID 0x00200000
+#define LX_CLONE_DETACH 0x00400000
+#define LX_CLONE_CHILD_SETTID 0x01000000
#ifdef __cplusplus
}
diff --git a/usr/src/common/util/getresponse.c b/usr/src/common/util/getresponse.c
index cc838a7ab1..992e81705f 100644
--- a/usr/src/common/util/getresponse.c
+++ b/usr/src/common/util/getresponse.c
@@ -125,7 +125,7 @@ yes_no(int (*func)(char *))
char ans[LINE_MAX + 1];
/* Get user's answer */
- for (i = 0; b = getchar(); i++) {
+ for (i = 0; (b = getchar()) != 0; i++) {
if (b == '\n' || b == '\0' || b == EOF)
break;
if (i < LINE_MAX)