diff --git a/sortix/fs/devfs.cpp b/sortix/fs/devfs.cpp index 3419c524..9204032c 100644 --- a/sortix/fs/devfs.cpp +++ b/sortix/fs/devfs.cpp @@ -218,7 +218,7 @@ namespace Sortix if ( String::Compare(path, "/null") == 0 ) { return new DevNull; } if ( String::Compare(path, "/tty") == 0 ) { return new DevLogTTY; } - Error::Set(ENOENT); + Error::Set(flags & O_CREAT ? EPERM : ENOENT); return NULL; } @@ -231,7 +231,7 @@ namespace Sortix } Error::Set(EPERM); - return true; + return false; } }