summaryrefslogtreecommitdiff
path: root/arch/um/os-Linux/tt.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-09-16 19:27:50 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 11:50:00 -0700
commit0f80bc85c587e8fdeecece4f294a47eca4922ea2 (patch)
treef18924fbc19779b2fffb5337c8c6826d2d181508 /arch/um/os-Linux/tt.c
parentb4fd310e163477236a241580b3b8c29aee65f4cc (diff)
downloadkernel-common-0f80bc85c587e8fdeecece4f294a47eca4922ea2.tar.gz
kernel-common-0f80bc85c587e8fdeecece4f294a47eca4922ea2.tar.bz2
kernel-common-0f80bc85c587e8fdeecece4f294a47eca4922ea2.zip
[PATCH] uml: move libc code out of mem_user.c and tempfile.c
The serial UML OS-abstraction layer patch (um/kernel dir). This moves all system calls from mem_user.c and tempfile.c files under os-Linux dir. Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com> Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/os-Linux/tt.c')
-rw-r--r--arch/um/os-Linux/tt.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c
index 5b047ab8416a..a6db8877931a 100644
--- a/arch/um/os-Linux/tt.c
+++ b/arch/um/os-Linux/tt.c
@@ -36,6 +36,20 @@
#include "mode.h"
#include "tempfile.h"
+int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x,
+ int must_succeed)
+{
+ int err;
+
+ err = os_protect_memory((void *) addr, len, r, w, x);
+ if(err < 0){
+ if(must_succeed)
+ panic("protect failed, err = %d", -err);
+ else return(err);
+ }
+ return(0);
+}
+
/*
*-------------------------
* only for tt mode (will be deleted in future...)