X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2FRuntime.java;h=39a4f14d19c268685289c15f15963fbf5869364f;hp=a04dac27385a30349a95d82469060559774fee4d;hb=ef1c27c7eff6c432f3ad7a21671947b87539acb2;hpb=034a42fa65955289442614ef9914e5474fac62aa diff --git a/src/org/ibex/nestedvm/Runtime.java b/src/org/ibex/nestedvm/Runtime.java index a04dac2..39a4f14 100644 --- a/src/org/ibex/nestedvm/Runtime.java +++ b/src/org/ibex/nestedvm/Runtime.java @@ -1070,6 +1070,10 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable { /** Seek in the filedescriptor. Whence is SEEK_SET, SEEK_CUR, or SEEK_END. Should return -1 on error or the new position. */ public int seek(int n, int whence) throws IOException { return -1; } + /** Return a Seekable object representing this file descriptor (can be read only) + This is required for exec() */ + Seekable seekable() { return null; } + /** Should return true if this is a tty */ // FEATURE: get rid of the isatty syscall and just do with newlib's dumb isatty.c public boolean isatty() { return false; } @@ -1100,6 +1104,8 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable { protected abstract FStat _fstat(); + Seekable seekable() { return data; } + public int seek(int n, int whence) throws IOException { switch(whence) { case SEEK_SET: break;