blob: b42a7a81eea2f6f96aaa8256e824bd6f9235f993 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#include <errno.h>
#include <syscalls.h>
int syscall_open(const char *file, int flags, mode_t mode) {
const char *_file = copy_and_allocate_user_string(file);
if (!_file) {
return -EFAULT;
}
int _flags = flags;
int _mode = mode;
int rc = vfs_open(_file, _flags, _mode);
kfree((void*)_file);
return rc;
}
|