summaryrefslogtreecommitdiff
path: root/libc/src/open.c
blob: 78d40bed7829de03a981f75913e1447057a9d2c3 (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;
    
    set_errno(EACCES);
    return -1;
}