Go to the documentation of this file.
   54     kprintf(
"uap->size: %i, FD: [0x%X], BUF: [0x%X][%c]\n", uap->
nbytes, uap->
fd, uap->
buf, t[0]);
 
   79   if (args->
FILE->
fd == 0x0) {
 
  151   struct file *fdd = 0x0;
 
  158   if (fdd == 0 || fdd->
fd == 0x0) {
 
  199   struct file *fdd = 0x0;
 
  206   if (fdd == 0 || fdd->
fd == 0x0) {
 
  241     kprintf(
"Error: userFd == NULL, File: %s, Line: %i\n", __FILE__, __LINE__);
 
  246   if (args->
FILE->
fd != 0x0) {
 
  330   tmpFd->
offset = offset + whence;
 
  399   char *mountPoint = 0x0;
 
  405     kprintf(
"Error: tmpFd == NULL, File: %s, Line: %i\n", __FILE__, __LINE__);
 
  414   if (path[0] == 
"." && path[1] == 
'\0')
 
  421   if (
strstr(fileName, 
":")) {
 
  422     mountPoint = (
char*) 
strtok((
char*) &fileName, 
":");
 
  435   if (mountPoint == 0x0) {
 
  442   if (tmpFd->
mp == 0x0) {
 
  449   for (i = 0; 
'\0' != flags[i]; i++) {
 
  468         kprintf(
"Invalid mode '%c' for fopen\n", flags[i]);
 
  481     if (tmpFd->
buffer == 0x0) {
 
  483       kprintf(
"Error: tmpFd->buffer == NULL, File: %s, Line: %i\n", __FILE__, __LINE__);
 
  542   kprintf(
"[%s:%i]", __FILE__, __LINE__);
 
  544   for (tmpFd = 
fdTable; tmpFd != 0x0; tmpFd = tmpFd->
next) {
 
  594   if (
strstr(path, 
":") == 0x0) {
 
  596     dir = (
char*) &tmpDir;
 
  598   while (
strstr(dir, 
"/")) {
 
  599     if (rootPath[0] == 0x0)
 
  608   tmpFD = 
fopen(rootPath, 
"rb");
 
  610   if (tmpFD->
mp == 0x0) {
 
  611     kprintf(
"Invalid Mount Point\n");
 
  628 int unlink(
const char *node) {
 
  629   char *path = 0x0, *mountPoint = 0x0;
 
  632   path = (
char*) 
strtok((
char*) node, 
"@");
 
  
 
char * strtok(char *str, const char *sep)
int sys_fclose(struct thread *td, struct sys_fclose_args *args)
int fputc(int ch, fileDescriptor_t *fd)
struct vfs_mountPoint * vfs_findMount(char *mountPoint)
char * strcpy(char *, const char *)
userFileDescriptor * FILE
int unlink(const char *node)
fileDescriptor_t * fopen(const char *file, const char *flags)
int sysUnlink(const char *path, int *retVal)
int sys_fgetc(struct thread *td, struct sys_fgetc_args *args)
struct fileDescriptor * fd
size_t fread(void *ptr, size_t size, size_t nmemb, fileDescriptor_t *fd)
void kfree(void *baseAddr)
int sys_fopen(struct thread *td, struct sys_fopen_args *args)
int tty_print(char *, tty_term *)
void spinUnlock(spinLock_t *lock)
int feof(fileDescriptor_t *fd)
size_t fwrite(void *ptr, int size, int nmemb, fileDescriptor_t *fd)
userFileDescriptor * FILE
int(* vfsWrite)(void *, char *, long, long)
#define SPIN_LOCK_INITIALIZER
userFileDescriptor * FILE
void sysMkDir(const char *path)
fileDescriptor_t * fdTable
struct vfs_mountPoint * mp
int sprintf(char *buf, const char *fmt,...)
void spinLock(spinLock_t *lock)
int(* vfsMakeDir)(char *, void *)
int sys_fwrite(struct thread *td, struct sys_fwrite_args *uap)
vitalsNode * systemVitals
int fclose(fileDescriptor_t *fd)
int sys_fchdir(struct thread *td, struct sys_fchdir_args *args)
void sysFwrite(char *ptr, int size, userFileDescriptor *userFd)
int(* vfsRead)(void *, char *, long, long)
int getfd(struct thread *td, struct file **fp, int fd)
get pointer to file fd in specified thread
int sys_fseek(struct thread *td, struct sys_fseek_args *args)
int sys_fread(struct thread *td, struct sys_fread_args *args)
int sys_chdir(struct thread *td, struct sys_chdir_args *args)
userFileDescriptor * FILE
tty_term * tty_foreground
userFileDescriptor * FILE
void * kmalloc(uInt32 len)
void * memset(void *dst, int c, size_t length)
int fgetc(fileDescriptor_t *fd)
int sys_rename(struct thread *td, struct sys_rename_args *args)
int kprintf(const char *,...)
int sys_lseek(struct thread *td, struct sys_lseek_args *args)
fileDescriptor_t * vfs_fileTable
char * strstr(const char *s, char *find)
int(* vfsUnlink)(char *, void *)
struct fileDescriptor * prev
int(* vfsOpenFile)(void *, void *)
struct fileDescriptor * next
int fseek(fileDescriptor_t *tmpFd, long offset, int whence)