X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FUnixRuntime.java;h=723af470c911269658b6cc7cda8d615fc1af323c;hp=0bed8ed27ef330538112c773149dacc134fec68d;hb=8c7ea58a4a2eade641083daa87987c5b5425dda2;hpb=f3c650e13377bcb68dfa3571dc7561bc60e76ffd diff --git a/src/org/ibex/nestedvm/UnixRuntime.java b/src/org/ibex/nestedvm/UnixRuntime.java index 0bed8ed..723af47 100644 --- a/src/org/ibex/nestedvm/UnixRuntime.java +++ b/src/org/ibex/nestedvm/UnixRuntime.java @@ -543,7 +543,7 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { } } - private static class MP { + private static class MP implements Comparable { public MP(String path, FS fs) { this.path = path; this.fs = fs; } public String path; public FS fs; @@ -650,7 +650,7 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { public synchronized Object exec(UnixRuntime r, String path) throws ErrnoException { // FIXME: Hideous hack to make a standalone busybox possible - if(path.equals("bin/busybox") && r.getClass().getName().endsWith("BusyBox")) + if(path.equals("bin/busybox") && Boolean.valueOf(getSystemProperty("nestedvm.busyboxhack")).booleanValue()) return r.getClass(); FStat fstat = stat(r,path); if(fstat == null) return null; @@ -986,16 +986,12 @@ public abstract class UnixRuntime extends Runtime implements Cloneable { } private FD devZeroFD = new FD() { - public boolean readable() { return true; } - public boolean writable() { return true; } public int read(byte[] a, int off, int length) { Arrays.fill(a,off,off+length,(byte)0); return length; } public int write(byte[] a, int off, int length) { return length; } public int seek(int n, int whence) { return 0; } public FStat _fstat() { return new DevFStat(){ public int inode() { return ZERO_INODE; } }; } }; private FD devNullFD = new FD() { - public boolean readable() { return true; } - public boolean writable() { return true; } public int read(byte[] a, int off, int length) { return 0; } public int write(byte[] a, int off, int length) { return length; } public int seek(int n, int whence) { return 0; }