X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FUnixRuntime.java;h=5adcba04ff4b88c4eda148ec56a3d7fbf214d4b4;hp=306b70e5a4b09bfe2388ec0633f194d0049314bc;hb=bde3f4baced21ef9d19907d74401196e6c3d2467;hpb=b11e7c6c29f2b5f7b0828bf93eb741c4a30ec411 diff --git a/src/org/ibex/nestedvm/UnixRuntime.java b/src/org/ibex/nestedvm/UnixRuntime.java index 306b70e..5adcba0 100644 --- a/src/org/ibex/nestedvm/UnixRuntime.java +++ b/src/org/ibex/nestedvm/UnixRuntime.java @@ -119,7 +119,7 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { } } - int _syscall(int syscall, int a, int b, int c, int d, int e, int f) throws ErrnoException, FaultException { + protected int _syscall(int syscall, int a, int b, int c, int d, int e, int f) throws ErrnoException, FaultException { switch(syscall) { case SYS_kill: return sys_kill(a,b); case SYS_fork: return sys_fork(); @@ -195,7 +195,7 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { private int sys_access(int cstring, int mode) throws ErrnoException, ReadFaultException { // FEATURE: sys_access - return gs.stat(this,cstring(cstring)) == null ? -ENOENT : 0; + return gs.stat(this,normalizePath(cstring(cstring))) == null ? -ENOENT : 0; } private int sys_realpath(int inAddr, int outAddr) throws FaultException { @@ -563,7 +563,7 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { return 0; } - static class Pipe { + public static class Pipe { private final byte[] pipebuf = new byte[PIPE_BUF*4]; private int readPos; private int writePos; @@ -1811,7 +1811,7 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { if(path.startsWith("fd/")) { int n; try { - n = Integer.parseInt(path.substring(4)); + n = Integer.parseInt(path.substring(3)); } catch(NumberFormatException e) { return null; }