X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FRuntime.java;h=8b577372a11aa9d2fc589d32d652ed451bab84ef;hb=b5282b0a1a8ca5212c75623610be6d0483fd35bd;hp=f6a00df4c6c73cb177550f091a8a0a0525e6b880;hpb=49cb14fa5b1e479ed41c38fd60372d9cd3086cd3;p=nestedvm.git diff --git a/src/org/ibex/nestedvm/Runtime.java b/src/org/ibex/nestedvm/Runtime.java index f6a00df..8b57737 100644 --- a/src/org/ibex/nestedvm/Runtime.java +++ b/src/org/ibex/nestedvm/Runtime.java @@ -1,3 +1,7 @@ +// Copyright 2000-2005 the Contributors, as shown in the revision logs. +// Licensed under the Apache Public Source License 2.0 ("the License"). +// You may not use this file except in compliance with the License. + // Copyright 2003 Brian Alliet // Based on org.xwt.imp.MIPS by Adam Megacz // Portions Copyright 2003 Adam Megacz @@ -1061,6 +1065,10 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable { case SYS_getpagesize: return sys_getpagesize(); case SYS_fcntl: return sys_fcntl(a,b,c); case SYS_sysconf: return sys_sysconf(a); + case SYS_getuid: return sys_getuid(); + case SYS_geteuid: return sys_geteuid(); + case SYS_getgid: return sys_getgid(); + case SYS_getegid: return sys_getegid(); case SYS_memcpy: memcpy(a,b,c); return a; case SYS_memset: memset(a,b,c); return a; @@ -1082,6 +1090,11 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable { } } + private int sys_getuid() { return 0; } + private int sys_geteuid() { return 0; } + private int sys_getgid() { return 0; } + private int sys_getegid() { return 0; } + public int xmalloc(int size) { int p=malloc(size); if(p==0) throw new RuntimeException("malloc() failed"); return p; } public int xrealloc(int addr,int newsize) { int p=realloc(addr,newsize); if(p==0) throw new RuntimeException("realloc() failed"); return p; } public int realloc(int addr, int newsize) { try { return call("realloc",addr,newsize); } catch(CallException e) { return 0; } }