xv6/sysfile.c File Reference

#include "types.h"
#include "defs.h"
#include "param.h"
#include "stat.h"
#include "mmu.h"
#include "proc.h"
#include "fs.h"
#include "file.h"
#include "fcntl.h"

Go to the source code of this file.

Functions

static int argfd (int n, int *pfd, struct file **pf)
static int fdalloc (struct file *f)
int sys_dup (void)
int sys_read (void)
int sys_write (void)
int sys_close (void)
int sys_fstat (void)
int sys_link (void)
static int isdirempty (struct inode *dp)
int sys_unlink (void)
static struct inodecreate (char *path, short type, short major, short minor)
int sys_open (void)
int sys_mkdir (void)
int sys_mknod (void)
int sys_chdir (void)
int sys_exec (void)
int sys_pipe (void)


Function Documentation

static int argfd ( int  n,
int *  pfd,
struct file **  pf 
) [static]

Definition at line 14 of file sysfile.c.

References argint(), and NOFILE.

Referenced by sys_close(), sys_dup(), sys_fstat(), sys_read(), and sys_write().

static struct inode* create ( char *  path,
short  type,
short  major,
short  minor 
) [static, read]

static int fdalloc ( struct file f  )  [static]

Definition at line 33 of file sysfile.c.

References NOFILE.

Referenced by sys_dup(), sys_open(), and sys_pipe().

static int isdirempty ( struct inode dp  )  [static]

Definition at line 149 of file sysfile.c.

References panic(), readi(), and inode::size.

Referenced by sys_unlink().

int sys_chdir ( void   ) 

Definition at line 327 of file sysfile.c.

References argstr(), ilock(), iput(), iunlock(), iunlockput(), namei(), T_DIR, and inode::type.

int sys_close ( void   ) 

Definition at line 85 of file sysfile.c.

References argfd(), and fileclose().

int sys_dup ( void   ) 

Definition at line 47 of file sysfile.c.

References argfd(), fdalloc(), and filedup().

int sys_exec ( void   ) 

Definition at line 346 of file sysfile.c.

References argint(), argstr(), argv, exec(), fetchint(), fetchstr(), memset(), and NELEM.

int sys_fstat ( void   ) 

Definition at line 98 of file sysfile.c.

References argfd(), argptr(), and filestat().

int sys_link ( void   ) 

int sys_mkdir ( void   ) 

Definition at line 298 of file sysfile.c.

References argstr(), create(), iunlockput(), and T_DIR.

int sys_mknod ( void   ) 

Definition at line 310 of file sysfile.c.

References argint(), argstr(), create(), iunlockput(), inode::major, inode::minor, and T_DEV.

int sys_open ( void   ) 

int sys_pipe ( void   ) 

Definition at line 371 of file sysfile.c.

References argptr(), fdalloc(), fileclose(), and pipealloc().

int sys_read ( void   ) 

Definition at line 61 of file sysfile.c.

References argfd(), argint(), argptr(), and fileread().

int sys_unlink ( void   ) 

int sys_write ( void   ) 

Definition at line 73 of file sysfile.c.

References argfd(), argint(), argptr(), and filewrite().


Generated on Fri Jan 7 12:25:49 2011 for xv6 by  doxygen 1.5.6