summaryrefslogtreecommitdiff
path: root/libc/src/open.c
blob: 71a96d18901c2d0c4bef1c57a68e6851a19be871 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "stdio.h"
#include "reent.h"
#include "errno.h"
#include <fio.h>
#include <filesystem.h>

int open(const char * path, int flags) {
    int r;
    
    r = fs_open(path, flags, 0755);
    
    if (r >= 0)
        return r;
    
    _impure_ptr->_errno = EACCES;
    return -1;
}