main.c File Reference

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

Defines

#define DEBUG_NAMI   (1<<0)
#define DEBUG_OPEN   (1<<1)
#define DEBUG_IO   (1<<2)
#define DEBUG_STAT   (1<<3)
#define DEBUG_MISC   (1<<4)
#define DEBUG_CHMOD   (1<<5)
#define DEBUG   (0)
#define MAXRAMFS   128
#define RAMFS_USAGE   "usage: ramfs [-g gate]"

Functions

void sys_fd_ramfs_dump (t_tcb *caller)
int is_holder (t_ramfs *ramfs, pid_t pid)
int is_last_holder (t_ramfs *ramfs, pid_t pid)
int holder_add (t_ramfs_info *info, t_ramfs *ramfs, pid_t pid)
int holder_rm (t_ramfs_info *info, t_ramfs *ramfs, pid_t pid)
int entry_access (t_ramfs_entry *entry, struct s_ucred *ucred, int how)
int nami (char *path, struct s_ucred *ucred, t_ramfs_entry **entryp)
int dostat (t_ramfs_entry *entry, struct stat *st)
void sys_fd_ramfs_stat (t_tcb *caller)
void sys_fd_ramfs_fstat (t_tcb *caller)
void sys_fd_ramfs_chmod (t_tcb *caller)
void sys_fd_ramfs_access (t_tcb *caller)
void sys_fd_ramfs_open (t_tcb *caller)
void sys_fd_ramfs_getdents (t_tcb *caller)
void sys_fd_ramfs_read (t_tcb *caller)
void sys_fd_ramfs_write (t_tcb *caller)
void sys_fd_ramfs_lseek (t_tcb *caller)
void sys_fd_ramfs_close (t_tcb *caller)
void sys_fd_ramfs_mkdir (t_tcb *caller)
void sys_fd_ramfs_link (t_tcb *caller)
void sys_fd_ramfs_symlink (t_tcb *caller)
void sys_fd_ramfs_readlink (t_tcb *caller)
void sys_fd_ramfs_unlink (t_tcb *caller)
void sys_fd_ramfs_rmdir (t_tcb *caller)
void sys_fd_ramfs_poll (t_tcb *caller)
void sys_fd_ramfs_mount (t_tcb *caller)
void sys_fd_ramfs_umount (t_tcb *caller)
void sys_fd_ramfs_ioctl (t_tcb *caller)
void do_ramfssrv_syscall ()
void ramfssrv_syscall ()
void treat_dead (pid_t deadpid)
void signotify (int sig)
void ramfsd_main ()
pid_t create_ramfsd ()
void create_ramfssrv ()
int main (int argc, char **argv)

Variables

t_ramfs_info info
t_ramfs ramfss [MAXRAMFS]
int my_gate = GATE_RAMFS

Define Documentation

#define DEBUG   (0)
 

#define DEBUG_CHMOD   (1<<5)
 

#define DEBUG_IO   (1<<2)
 

#define DEBUG_MISC   (1<<4)
 

#define DEBUG_NAMI   (1<<0)
 

#define DEBUG_OPEN   (1<<1)
 

#define DEBUG_STAT   (1<<3)
 

#define MAXRAMFS   128
 

#define RAMFS_USAGE   "usage: ramfs [-g gate]"
 


Function Documentation

pid_t create_ramfsd  ) 
 

allocate a task for ramfs server

void create_ramfssrv  ) 
 

allocate a task for ramfs server

void do_ramfssrv_syscall  ) 
 

int dostat t_ramfs_entry entry,
struct stat st
 

int entry_access t_ramfs_entry entry,
struct s_ucred ucred,
int  how
 

int holder_add t_ramfs_info info,
t_ramfs ramfs,
pid_t  pid
 

int holder_rm t_ramfs_info info,
t_ramfs ramfs,
pid_t  pid
 

int is_holder t_ramfs ramfs,
pid_t  pid
 

int is_last_holder t_ramfs ramfs,
pid_t  pid
 

int main int  argc,
char **  argv
 

int nami char *  path,
struct s_ucred ucred,
t_ramfs_entry **  entryp
 

void ramfsd_main  ) 
 

void ramfssrv_syscall  ) 
 

void signotify int  sig  ) 
 

void sys_fd_ramfs_access t_tcb caller  ) 
 

void sys_fd_ramfs_chmod t_tcb caller  ) 
 

void sys_fd_ramfs_close t_tcb caller  ) 
 

void sys_fd_ramfs_dump t_tcb caller  ) 
 

void sys_fd_ramfs_fstat t_tcb caller  ) 
 

void sys_fd_ramfs_getdents t_tcb caller  ) 
 

void sys_fd_ramfs_ioctl t_tcb caller  ) 
 

void sys_fd_ramfs_link t_tcb caller  ) 
 

void sys_fd_ramfs_lseek t_tcb caller  ) 
 

void sys_fd_ramfs_mkdir t_tcb caller  ) 
 

void sys_fd_ramfs_mount t_tcb caller  ) 
 

void sys_fd_ramfs_open t_tcb caller  ) 
 

void sys_fd_ramfs_poll t_tcb caller  ) 
 

void sys_fd_ramfs_read t_tcb caller  ) 
 

void sys_fd_ramfs_readlink t_tcb caller  ) 
 

void sys_fd_ramfs_rmdir t_tcb caller  ) 
 

void sys_fd_ramfs_stat t_tcb caller  ) 
 

void sys_fd_ramfs_symlink t_tcb caller  ) 
 

void sys_fd_ramfs_umount t_tcb caller  ) 
 

void sys_fd_ramfs_unlink t_tcb caller  ) 
 

void sys_fd_ramfs_write t_tcb caller  ) 
 

void treat_dead pid_t  deadpid  ) 
 


Variable Documentation

t_ramfs_info info
 

int my_gate = GATE_RAMFS
 

t_ramfs ramfss[MAXRAMFS]
 


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