summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjdike <jdike>2004-01-19 21:03:08 +0000
committerjdike <jdike>2004-01-19 21:03:08 +0000
commit4577f0cfd6f2a056e1e260f05aa925f026bcc23b (patch)
tree730bb392e95feb22184912e6a5da2de854ddf680
parent38f817460f5222249429800e62461b0f7187b967 (diff)
downloaduml-history-4577f0cfd6f2a056e1e260f05aa925f026bcc23b.tar.gz
Fixed some small bug and compile problems.
-rw-r--r--arch/um/kernel/skas/include/uaccess.h6
-rw-r--r--arch/um/kernel/skas/syscall_kern.c2
-rw-r--r--arch/um/kernel/tt/ptproxy/wait.c2
3 files changed, 6 insertions, 4 deletions
diff --git a/arch/um/kernel/skas/include/uaccess.h b/arch/um/kernel/skas/include/uaccess.h
index db499c5..0d6f30b 100644
--- a/arch/um/kernel/skas/include/uaccess.h
+++ b/arch/um/kernel/skas/include/uaccess.h
@@ -6,6 +6,8 @@
#ifndef __SKAS_UACCESS_H
#define __SKAS_UACCESS_H
+#include "asm/errno.h"
+
#define access_ok_skas(type, addr, size) \
((segment_eq(get_fs(), KERNEL_DS)) || \
(((unsigned long) (addr) < TASK_SIZE) && \
@@ -17,8 +19,6 @@ static inline int verify_area_skas(int type, const void * addr,
return(access_ok_skas(type, addr, size) ? 0 : -EFAULT);
}
-#endif
-
extern int copy_from_user_skas(void *to, const void *from, int n);
extern int copy_to_user_skas(void *to, const void *from, int n);
extern int strncpy_from_user_skas(char *dst, const char *src, int count);
@@ -26,6 +26,8 @@ extern int __clear_user_skas(void *mem, int len);
extern int clear_user_skas(void *mem, int len);
extern int strnlen_user_skas(const void *str, int len);
+#endif
+
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
diff --git a/arch/um/kernel/skas/syscall_kern.c b/arch/um/kernel/skas/syscall_kern.c
index 1d7eca5..7b5d55d 100644
--- a/arch/um/kernel/skas/syscall_kern.c
+++ b/arch/um/kernel/skas/syscall_kern.c
@@ -23,7 +23,7 @@ long execute_syscall_skas(void *r)
nsyscalls++;
syscall = UPT_SYSCALL_NR(&regs->regs);
- if((syscall >= NR_syscalls) || (syscall < 0))
+ if((syscall >= NR_syscalls) || (syscall < 1))
res = -ENOSYS;
else res = EXECUTE_SYSCALL(syscall, regs);
diff --git a/arch/um/kernel/tt/ptproxy/wait.c b/arch/um/kernel/tt/ptproxy/wait.c
index 7e0ac8c..86ef676 100644
--- a/arch/um/kernel/tt/ptproxy/wait.c
+++ b/arch/um/kernel/tt/ptproxy/wait.c
@@ -61,7 +61,7 @@ int real_wait_return(struct debugger *debugger)
pid = debugger->pid;
ip = ptrace(PTRACE_PEEKUSER, pid, PT_IP_OFFSET, 0);
- ip = IP_RESTART_SYSCALL(ip);
+ IP_RESTART_SYSCALL(ip);
if(ptrace(PTRACE_POKEUSER, pid, PT_IP_OFFSET, ip) < 0)
tracer_panic("real_wait_return : Failed to restart system "