fopen_internal: return ENOENT on file not found

This is actually expected by open(2), but I do not expect the BIOS
implementation to conform.
This commit is contained in:
Xavier Del Campo Romero 2021-10-24 02:56:15 +02:00
parent 9157d1d6e6
commit 9c6112eb5b
1 changed files with 1 additions and 0 deletions

View File

@ -177,6 +177,7 @@ static FILE *fopen_internal(const char *path, const char *mode, FILE *f)
if(fd == -1)
{
errno = ENOENT;
if(s!=NULL)free(s);
return NULL;
}