#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 inode * | create (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) |
| 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] |
Definition at line 213 of file sysfile.c.
References inode::dev, dirlink(), dirlookup(), DIRSIZ, ialloc(), ilock(), inode::inum, iunlockput(), iupdate(), inode::major, inode::minor, name, nameiparent(), inode::nlink, panic(), T_DIR, T_FILE, and inode::type.
Referenced by sys_mkdir(), sys_mknod(), and sys_open().
| 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 | ) |
| int sys_dup | ( | void | ) |
| 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 | ) |
| int sys_link | ( | void | ) |
Definition at line 110 of file sysfile.c.
References argstr(), inode::dev, dirlink(), DIRSIZ, ilock(), inode::inum, iput(), iunlock(), iunlockput(), iupdate(), name, namei(), nameiparent(), inode::nlink, T_DIR, and inode::type.
| int sys_mkdir | ( | void | ) |
| 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 | ) |
Definition at line 257 of file sysfile.c.
References argint(), argstr(), create(), fdalloc(), filealloc(), fileclose(), ilock(), file::ip, iunlock(), iunlockput(), namei(), O_CREATE, O_RDONLY, O_RDWR, O_WRONLY, file::off, file::readable, T_DIR, T_FILE, file::type, inode::type, and file::writable.
| int sys_pipe | ( | void | ) |
Definition at line 371 of file sysfile.c.
References argptr(), fdalloc(), fileclose(), and pipealloc().
| int sys_read | ( | void | ) |
| int sys_unlink | ( | void | ) |
Definition at line 164 of file sysfile.c.
References argstr(), dirlookup(), DIRSIZ, ilock(), isdirempty(), iunlockput(), iupdate(), memset(), name, namecmp(), nameiparent(), inode::nlink, panic(), T_DIR, inode::type, and writei().
| int sys_write | ( | void | ) |
1.5.6