The Hackerlab at regexps.com

VU Native File System Access

up: libhackerlab
next: A VU Name Handler for Standard Input and Output
prev: A Virtual Unix File-System Interface

These functions define a trivial file-system implementation in which all functions call their system-call equivalents.

Function vu_sys_make_closure

void * vu_sys_make_closure (void * closure);

Return closure .



Function vu_sys_free_closure

void vu_sys_free_closure (void * closure);

A noop.



Function vu_sys_access

int vu_sys_access (int * errn, char * path, int mode, void * closure);

Call access .



Function vu_sys_chdir

int vu_sys_chdir (int * errn, char * path, void * closure);

Call chdir .



Function vu_sys_chmod

int vu_sys_chmod (int * errn, char * path, int mode, void * closure);

Call chmod .



Function vu_sys_chown

int vu_sys_chown (int * errn,
                  char * path,
                  int owner,
                  int group,
                  void * closure);

Call chown .



Function vu_sys_chroot

int vu_sys_chroot (int * errn, char * path, void * closure);

Call chroot .



Function vu_sys_closedir

int vu_sys_closedir (int * errn, DIR * dir, void * closure);

Call closedir .



Function vu_sys_close

int vu_sys_close (int * errn, int fd, void * closure);

Call close .



Function vu_sys_fchdir

int vu_sys_fchdir (int * errn, int fd, void * closure);

Call fchdir .



Function vu_sys_fchmod

int vu_sys_fchmod (int * errn, int fd, int mode, void * closure);

Call fchmod .



Function vu_sys_fchown

int vu_sys_fchown (int * errn,
                   int fd,
                   int owner,
                   int group,
                   void * closure);

Call fchown .



Function vu_sys_fstat

int vu_sys_fstat (int * errn,
                  int fd,
                  struct stat * buf,
                  void * closure);

Call fstat .



Function vu_sys_fsync

int vu_sys_fsync (int * errn, int fd, void * closure);

Call fsync .



Function vu_sys_ftruncate

int vu_sys_ftruncate (int * errn, int fd, off_t where, void * closure);

Call ftruncate .



Function vu_sys_link

int vu_sys_link (int * errn, char * from, char * to, void * closure);

Call link .



Function vu_sys_lseek

off_t vu_sys_lseek (int * errn,
                    int fd,
                    off_t offset,
                    int whence,
                    void * closure);

Call lseek .



Function vu_sys_lstat

int vu_sys_lstat (int * errn,
                  char * path,
                  struct stat * buf,
                  void * closure);

Call lstat .



Function vu_sys_mkdir

int vu_sys_mkdir (int * errn, char * path, int mode, void * closure);

Call mkdir .



Function vu_sys_open

int vu_sys_open (int * errn,
                 char * path,
                 int flags,
                 int mode,
                 void * closure);

Call open .



Function vu_sys_opendir

int vu_sys_opendir (int * errn,
                    DIR ** retv,
                    char * path,
                    void * closure);

Call opendir .



Function vu_sys_read

ssize_t vu_sys_read (int * errn,
                     int fd,
                     char * buf,
                     size_t count,
                     void * closure);

Call read .



Function vu_sys_readdir

int vu_sys_readdir (int * errn,
                    struct alloc_limits * limits,
                    char ** file_ret,
                    DIR * dir,
                    void * closure);

Call readdir .



Function vu_sys_readlink

int vu_sys_readlink (int * errn,
                     char * path,
                     char * buf,
                     int bufsize,
                     void * closure);

Call readlink .



Function vu_sys_rename

int vu_sys_rename (int * errn, char * from, char * to, void * closure);

Call rename .



Function vu_sys_rmdir

int vu_sys_rmdir (int * errn, char * path, void * closure);

Call rmdir .



Function vu_sys_stat

int vu_sys_stat (int * errn,
                 char * path,
                 struct stat * buf,
                 void * closure);

Call stat .



Function vu_sys_symlink

int vu_sys_symlink (int * errn, char * from, char * to, void * closure);

Call symlink .



Function vu_sys_truncate

int vu_sys_truncate (int * errn,
                     char * path,
                     off_t where,
                     void * closure);

Call truncate .



Function vu_sys_unlink

int vu_sys_unlink (int * errn, char * path, void * closure);

Call unlink .



Function vu_sys_utime

int vu_sys_utime (int * errn,
                  char * path,
                  struct utimbuf * times,
                  void * closure);

Call utime .



Function vu_sys_write

ssize_t vu_sys_write (int * errn,
                      int fd,
                      char * buf,
                      size_t count,
                      void * closure);

Call write .



Function vu_sys_fcntl

int vu_sys_fcntl (int * errn,
                  int fd,
                  int cmd,
                  long arg,
                  void * closure);

Call fcntl .



Function vu_sys_dup

int vu_sys_dup (int * errn, int fd, void * closure);

Call dup .



Function vu_sys_dup2

int vu_sys_dup2 (int * errn, int fd, int newfd, void * closure);

Call dup2 .



Function vu_sys_move_state

int vu_sys_move_state (int * errn, int fd, int newfd, void * closure);

A noop (return 0 ).



libhackerlab: The Hackerlab C Library
The Hackerlab at regexps.com