Improved error codes in devfs.

This commit is contained in:
Jonas 'Sortie' Termansen 2011-11-22 17:56:58 +01:00
parent 9f35df813e
commit 1b56d01f17
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}