diff --git a/fs/initrd.c b/fs/initrd.c index 8fb616d1..dca371de 100755 --- a/fs/initrd.c +++ b/fs/initrd.c @@ -169,7 +169,7 @@ static int initrd_open(fildes_t* file, const char* name) { if (file->node->type == FS_FILE) { if ((file->flags & O_CREAT) && (file->flags & O_EXCL)) - return -EINVAL; + return -EEXIST; /* in the case of O_TRUNC kfree all the nodes */ if (file->flags & O_TRUNC) { @@ -210,7 +210,7 @@ static int initrd_open(fildes_t* file, const char* name) if (file->node->type == FS_DIRECTORY) { if (!file->flags & O_CREAT) - return -EINVAL; + return -ENOENT; uint32_t i, j; block_list_t* blist = NULL;