From: brian Date: Sat, 17 Apr 2004 00:26:58 +0000 (-0700) Subject: more xwt -> ibex cleanup X-Git-Tag: merge~35 X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=commitdiff_plain;h=ae52817e5cb153f781b76f5d525e127f217b5482 more xwt -> ibex cleanup darcs-hash:20040417002658-24bed-504de1da43c13c347df33bf5640c06dae0059985.gz --- diff --git a/src/org/ibex/nestedvm/Runtime.java b/src/org/ibex/nestedvm/Runtime.java index fd2b985..6675d59 100644 --- a/src/org/ibex/nestedvm/Runtime.java +++ b/src/org/ibex/nestedvm/Runtime.java @@ -626,6 +626,17 @@ public abstract class Runtime implements UsermodeConstants,Registers { fds[fdn] = null; return true; } + + /** Duplicates the file descriptor fdn and returns the new fs */ + public int dupFD(int fdn) { + int i; + if(fdn < 0 || fdn >= OPEN_MAX) return -1; + if(fds[fdn] == null) return -1; + for(i=0;i