aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/tt.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2005-09-16 22:27:50 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-17 14:50:00 -0400
commit0f80bc85c587e8fdeecece4f294a47eca4922ea2 (patch)
treef18924fbc19779b2fffb5337c8c6826d2d181508 /arch/um/os-Linux/tt.c
parentb4fd310e163477236a241580b3b8c29aee65f4cc (diff)
[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 5b047ab8416..a6db8877931 100644
--- a/arch/um/os-Linux/tt.c
+++ b/arch/um/os-Linux/tt.c
@@ -36,6 +36,20 @@
36#include "mode.h" 36#include "mode.h"
37#include "tempfile.h" 37#include "tempfile.h"
38 38
39int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x,
40 int must_succeed)
41{
42 int err;
43
44 err = os_protect_memory((void *) addr, len, r, w, x);
45 if(err < 0){
46 if(must_succeed)
47 panic("protect failed, err = %d", -err);
48 else return(err);
49 }
50 return(0);
51}
52
39/* 53/*
40 *------------------------- 54 *-------------------------
41 * only for tt mode (will be deleted in future...) 55 * only for tt mode (will be deleted in future...)