public TerminalFD(OutputStream os) { this(null,os); }
public TerminalFD(InputStream is, OutputStream os) { super(is,os); }
public void _close() { /* noop */ }
- public FStat _fstat() { return new FStat() { public int type() { return S_IFCHR; } }; }
+ public FStat _fstat() { return new FStat() { public int type() { return S_IFCHR; } public int mode() { return 0600; } }; }
}
// FEATURE: TextInputStream: This is pretty inefficient but it is only used for reading from the console on win32
for(int i=0;i<list.length;i++) {
MP mp = list[i];
int mpl = mp.path.length();
- if(normalizedPath.startsWith(mp.path) && (pl == mpl || (pl < mpl && normalizedPath.charAt(mpl) == '/')))
+ if(normalizedPath.startsWith(mp.path) && (pl == mpl || normalizedPath.charAt(mpl) == '/'))
return dispatch(mp.fs,op,r,pl == mpl ? "" : normalizedPath.substring(mpl+1),arg1,arg2);
}
}
if(path.startsWith("fd/")) {
int n;
try {
- n = Integer.parseInt(path.substring(4));
+ n = Integer.parseInt(path.substring(3));
} catch(NumberFormatException e) {
return null;
}