UbixOS  2.0
vfs_calls.c File Reference
#include <ubixos/sched.h>
#include <sys/thread.h>
#include <sys/sysproto_posix.h>
#include <sys/descrip.h>
#include <sys/video.h>
#include <sys/pipe.h>
#include <sys/errno.h>
#include <string.h>
#include <ufs/ufs.h>
Include dependency graph for vfs_calls.c:

Go to the source code of this file.

Functions

int kern_openat (struct thread *thr, int afd, char *path, int flags, int mode)
 
int sys_access (struct thread *td, struct sys_access_args *args)
 
int sys_close (struct thread *td, struct sys_close_args *args)
 
int sys_getdirentries (struct thread *td, struct sys_getdirentries_args *args)
 
int sys_open (struct thread *td, struct sys_open_args *args)
 
int sys_openat (struct thread *td, struct sys_openat_args *args)
 
int sys_pread (struct thread *td, struct sys_pread_args *args)
 
int sys_read (struct thread *td, struct sys_read_args *args)
 
int sys_readlink (struct thread *thr, struct sys_readlink_args *args)
 
int sys_unlink (struct thread *td, struct sys_unlink_args *uap)
 
int sys_write (struct thread *td, struct sys_write_args *uap)
 

Function Documentation

◆ kern_openat()

int kern_openat ( struct thread thr,
int  afd,
char *  path,
int  flags,
int  mode 
)

Definition at line 397 of file vfs_calls.c.

References EINVAL, file::f_flag, falloc(), file::fd, fdestroy(), FFLAGS, FMASK, fopen(), kprintf(), O_ACCMODE, O_CREAT, O_EXEC, and thread::td_retval.

Referenced by sys_open().

Here is the call graph for this function:

◆ sys_access()

int sys_access ( struct thread td,
struct sys_access_args args 
)

Definition at line 364 of file vfs_calls.c.

References thread::td_retval.

◆ sys_close()

int sys_close ( struct thread td,
struct sys_close_args args 
)

◆ sys_getdirentries()

int sys_getdirentries ( struct thread td,
struct sys_getdirentries_args args 
)

Definition at line 371 of file vfs_calls.c.

References sys_getdirentries_args::buf, sys_getdirentries_args::count, DEV_BSIZE, file::fd, sys_getdirentries_args::fd, fread(), getfd(), and thread::td_retval.

Here is the call graph for this function:

◆ sys_open()

int sys_open ( struct thread td,
struct sys_open_args args 
)

Definition at line 39 of file vfs_calls.c.

References AT_FDCWD, sys_open_args::flags, kern_openat(), kprintf(), sys_open_args::mode, and sys_open_args::path.

Here is the call graph for this function:

◆ sys_openat()

int sys_openat ( struct thread td,
struct sys_openat_args args 
)

Definition at line 45 of file vfs_calls.c.

References falloc(), file::fd, fdestroy(), sys_openat_args::flag, fopen(), kprintf(), O_RDWR, O_WRONLY, sys_openat_args::path, and thread::td_retval.

Here is the call graph for this function:

◆ sys_pread()

int sys_pread ( struct thread td,
struct sys_pread_args args 
)

◆ sys_read()

◆ sys_readlink()

int sys_readlink ( struct thread thr,
struct sys_readlink_args args 
)

Definition at line 387 of file vfs_calls.c.

References sys_readlink_args::count, kprintf(), sys_readlink_args::path, and thread::td_retval.

Here is the call graph for this function:

◆ sys_unlink()

int sys_unlink ( struct thread td,
struct sys_unlink_args uap 
)

Definition at line 449 of file vfs_calls.c.

References fl_remove(), kprintf(), sys_unlink_args::path, and thread::td_retval.

Here is the call graph for this function:

◆ sys_write()