main.c File Reference

#include <core.h>
#include "vfsvar.h"

Defines

#define DEBUG_NAMM   (1<<0)
#define DEBUG_OPEN   (1<<1)
#define DEBUG_STAT   (1<<2)
#define DEBUG_IO   (1<<3)
#define DEBUG_WD   (1<<4)
#define DEBUG_MOUNT   (1<<5)
#define DEBUG_MISC   (1<<6)
#define DEBUG_NEWFDS   (1<<7)
#define DEBUG_CREATE_MP   (1<<8)
#define DEBUG   (0)
#define DEFAULT_NFDS   64
#define ROOT_PRESENT()   (info.root_entry.gate != -1)
#define FREEALL
#define VFS_USAGE   "usage: vfs [-v][-g gate]"

Functions

t_vfs_procvfs_proc_fetch (pid_t pid)
int vfs_proc_setup (t_vfs_proc *vp, int nfds)
int vfs_proc_copy (t_vfs_proc *vp, t_vfs_proc *parent_vp)
int vfs_proc_add (t_vfs_proc *vp)
t_vfs_procvfs_proc_get (pid_t pid, int nfds)
void vfs_proc_rm (t_vfs_proc *vp)
void vfs_proc_dump (char *s)
void vfs_tree_dump (t_vfs_entry *entry, char *name, int spc)
void sys_fd_vfs_dump (t_tcb *caller)
int namm (char *path, struct s_ucred *ucred, t_vfs_entry **mpp, int *skip_returned)
void sys_fd_vfs_stat (t_tcb *caller)
void sys_fd_vfs_fstat (t_tcb *caller)
void sys_fd_vfs_ioctl (t_tcb *caller)
void sys_fd_vfs_open (t_tcb *caller)
void sys_fd_vfs_getdents (t_tcb *caller)
void sys_fd_vfs_read (t_tcb *caller)
void sys_fd_vfs_write (t_tcb *caller)
void sys_fd_vfs_lseek (t_tcb *caller)
void sys_fd_vfs_close (t_tcb *caller)
void sys_fd_vfs_mkdir (t_tcb *caller)
void sys_fd_vfs_chdir (t_tcb *caller)
void sys_fd_vfs_link (t_tcb *caller)
void sys_fd_vfs_unlink (t_tcb *caller)
void sys_fd_vfs_poll (t_tcb *caller)
int create_mp (t_vfs_proc *vp, t_vfs_entry *parent, char *subpath, int gate)
void sys_fd_vfs_mount (t_tcb *caller)
void sys_fd_vfs_umount (t_tcb *caller)
void do_vfssrv_syscall ()
void vfssrv_syscall ()
void treat_dead (pid_t deadpid)
void signotify (int sig)
void vfsd_main ()
pid_t create_vfsd ()
void create_vfssrv ()
int main (int argc, char **argv)

Variables

int my_gate = GATE_VFS
t_vfs_info info
t_vfs_proc_list vfs_procs [PID_HSIZE]

Define Documentation

#define DEBUG   (0)
 

#define DEBUG_CREATE_MP   (1<<8)
 

#define DEBUG_IO   (1<<3)
 

#define DEBUG_MISC   (1<<6)
 

#define DEBUG_MOUNT   (1<<5)
 

#define DEBUG_NAMM   (1<<0)
 

#define DEBUG_NEWFDS   (1<<7)
 

#define DEBUG_OPEN   (1<<1)
 

#define DEBUG_STAT   (1<<2)
 

#define DEBUG_WD   (1<<4)
 

#define DEFAULT_NFDS   64
 

#define FREEALL
 

Value:

free(path_save2);\
      free(npath2);\
      free(path_save1);\
      free(npath1);\

 
#define ROOT_PRESENT  )     (info.root_entry.gate != -1)
 

#define VFS_USAGE   "usage: vfs [-v][-g gate]"
 


Function Documentation

int create_mp t_vfs_proc vp,
t_vfs_entry parent,
char *  subpath,
int  gate
 

pid_t create_vfsd  ) 
 

allocate a task for vfs server

void create_vfssrv  ) 
 

allocate a task for vfs server

void do_vfssrv_syscall  ) 
 

int main int  argc,
char **  argv
 

int namm char *  path,
struct s_ucred ucred,
t_vfs_entry **  mpp,
int *  skip_returned
 

void signotify int  sig  ) 
 

void sys_fd_vfs_chdir t_tcb caller  ) 
 

void sys_fd_vfs_close t_tcb caller  ) 
 

void sys_fd_vfs_dump t_tcb caller  ) 
 

void sys_fd_vfs_fstat t_tcb caller  ) 
 

void sys_fd_vfs_getdents t_tcb caller  ) 
 

void sys_fd_vfs_ioctl t_tcb caller  ) 
 

void sys_fd_vfs_link t_tcb caller  ) 
 

void sys_fd_vfs_lseek t_tcb caller  ) 
 

void sys_fd_vfs_mkdir t_tcb caller  ) 
 

void sys_fd_vfs_mount t_tcb caller  ) 
 

void sys_fd_vfs_open t_tcb caller  ) 
 

void sys_fd_vfs_poll t_tcb caller  ) 
 

void sys_fd_vfs_read t_tcb caller  ) 
 

void sys_fd_vfs_stat t_tcb caller  ) 
 

void sys_fd_vfs_umount t_tcb caller  ) 
 

void sys_fd_vfs_unlink t_tcb caller  ) 
 

void sys_fd_vfs_write t_tcb caller  ) 
 

void treat_dead pid_t  deadpid  ) 
 

int vfs_proc_add t_vfs_proc vp  ) 
 

int vfs_proc_copy t_vfs_proc vp,
t_vfs_proc parent_vp
 

void vfs_proc_dump char *  s  ) 
 

t_vfs_proc* vfs_proc_fetch pid_t  pid  ) 
 

t_vfs_proc* vfs_proc_get pid_t  pid,
int  nfds
 

void vfs_proc_rm t_vfs_proc vp  ) 
 

int vfs_proc_setup t_vfs_proc vp,
int  nfds
 

void vfs_tree_dump t_vfs_entry entry,
char *  name,
int  spc
 

void vfsd_main  ) 
 

void vfssrv_syscall  ) 
 


Variable Documentation

t_vfs_info info
 

int my_gate = GATE_VFS
 

t_vfs_proc_list vfs_procs[PID_HSIZE]
 


Generated on Wed May 24 23:06:01 2006 for LSE/OS by  doxygen 1.4.6