projects
/
nestedvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
9435228
)
chdir bug
author
brian
<brian@brianweb.net>
Fri, 21 May 2004 02:18:50 +0000
(19:18 -0700)
committer
brian
<brian@brianweb.net>
Fri, 21 May 2004 02:18:50 +0000
(19:18 -0700)
darcs-hash:
20040521021850
-24bed-
d3ab1c5e4a342c641b02d40ce43482ecb9b4159b
.gz
src/org/ibex/nestedvm/UnixRuntime.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/nestedvm/UnixRuntime.java
b/src/org/ibex/nestedvm/UnixRuntime.java
index
4c9ed5a
..
4475795
100644
(file)
--- a/
src/org/ibex/nestedvm/UnixRuntime.java
+++ b/
src/org/ibex/nestedvm/UnixRuntime.java
@@
-514,10
+514,10
@@
public abstract class UnixRuntime extends Runtime implements Cloneable {
private int sys_chdir(int addr) throws ErrnoException, FaultException {
String path = normalizePath(cstring(addr));
private int sys_chdir(int addr) throws ErrnoException, FaultException {
String path = normalizePath(cstring(addr));
- //System.err.println("Chdir: " + cstring(addr) + " -> " + path + " pwd: " + cwd);
- if(gs.stat(this,path).type() != FStat.S_IFDIR) return -ENOTDIR;
+ FStat st = gs.stat(this,path);
+ if(st == null) return -ENOENT;
+ if(st.type() != FStat.S_IFDIR) return -ENOTDIR;
cwd = path;
cwd = path;
- //System.err.println("Now: [" + cwd + "]");
return 0;
}
return 0;
}