mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 21:58:20 +00:00
vmmcache: initial implementation
This commit is contained in:
@@ -57,11 +57,18 @@ syscallret_t syscall_mmap(context_t *context, void *hint, size_t len, int prot,
|
||||
vmmfiledesc_t vfd;
|
||||
file_t *file = NULL;
|
||||
if (isfile) {
|
||||
// make sure offset is page aligned
|
||||
if (offset % PAGE_SIZE) {
|
||||
ret.errno = EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
file = fd_get(fd);
|
||||
if (file == NULL) {
|
||||
ret.errno = EBADF;
|
||||
return ret;
|
||||
}
|
||||
|
||||
vfd.node = file->vnode;
|
||||
vfd.offset = offset;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user