fix for really stupid O_EXCL bug
authorbrian <brian@brianweb.net>
Wed, 4 Aug 2004 09:27:40 +0000 (02:27 -0700)
committerbrian <brian@brianweb.net>
Wed, 4 Aug 2004 09:27:40 +0000 (02:27 -0700)
darcs-hash:20040804092740-24bed-9ac3b6c0b50656f8b0b80e64b61792b688794c34.gz

src/org/ibex/nestedvm/Runtime.java

index 8b57737..af84619 100644 (file)
@@ -740,7 +740,7 @@ public abstract class Runtime implements UsermodeConstants,Registers,Cloneable {
         
         if((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
             try {
-                if(Platform.atomicCreateFile(f)) throw new ErrnoException(EEXIST);
+                if(!Platform.atomicCreateFile(f)) throw new ErrnoException(EEXIST);
             } catch(IOException e) {
                 throw new ErrnoException(EIO);
             }