|
UbixOS V2
2.0
|
#include <sys/types.h>#include <ubixfs/dirCache.h>#include <sys/thread.h>#include <vfs/inode.h>#include <vfs/mount.h>#include <ufs/ufs.h>

Go to the source code of this file.
Data Structures | |
| struct | dmadat |
| struct | fileDescriptor |
| struct | sys_fwrite_args |
| struct | userFileDescriptorStruct |
Macros | |
| #define | DEV_BSHIFT 9 /* log2(DEV_BSIZE) */ |
| #define | DEV_BSIZE (1<<DEV_BSHIFT) |
| #define | MAX_OFILES 256 |
| #define | SBLOCKSIZE 8192 |
| #define | SEEK_CUR 1 |
| #define | SEEK_END 2 |
| #define | SEEK_SET 0 |
| #define | VBLKSHIFT 12 |
| #define | VBLKSIZE (1 << VBLKSHIFT) |
Typedefs | |
| typedef struct fileDescriptor | fileDescriptor_t |
| typedef struct userFileDescriptorStruct | userFileDescriptor |
Functions | |
| int | fclose (fileDescriptor_t *) |
| int | feof (fileDescriptor_t *fd) |
| int | fgetc (fileDescriptor_t *fd) |
| fileDescriptor_t * | fopen (const char *, const char *) |
| size_t | fread (void *ptr, size_t size, size_t nmemb, fileDescriptor_t *fd) |
| int | fseek (fileDescriptor_t *, long, int) |
| size_t | fwrite (void *ptr, int size, int nmemb, fileDescriptor_t *fd) |
| int | getchar () |
| int | sys_fwrite (struct thread *, struct sys_fwrite_args *) |
| int | sysFseek (userFileDescriptor *, long, int) |
| int | unlink (const char *path) |
| char * | verifyDir (const char *path) |
Variables | |
| fileDescriptor_t * | fdTable |
| #define DEV_BSIZE (1<<DEV_BSHIFT) |
| typedef struct fileDescriptor fileDescriptor_t |
| typedef struct userFileDescriptorStruct userFileDescriptor |
| int fclose | ( | fileDescriptor_t * | ) |
Definition at line 526 of file file.c.
References file::fd, and spinLock().
Referenced by _sys_stat(), dup2(), elf_load_file(), execFile(), fcntl(), kmod_load(), ldEnable(), sys_close(), sys_fclose(), sys_fstatat(), sysExec(), sysMkDir(), and systemTask().

| int feof | ( | fileDescriptor_t * | fd | ) |
Definition at line 337 of file file.c.
References file::fd, fdEof, and fileDescriptor::status.
| int fgetc | ( | fileDescriptor_t * | fd | ) |
Definition at line 366 of file file.c.
References file::fd, vfs_mountPoint::fs, fileDescriptor::mp, fileDescriptor::offset, and fileSystem::vfsRead.
Referenced by sys_fgetc().
| fileDescriptor_t* fopen | ( | const char * | , |
| const char * | |||
| ) |
Definition at line 388 of file file.c.
References _current, fileDescriptor::buffer, osInfo::cwd, file, fileAppend, fileBinary, fileDescriptor::fileName, fileRead, fileWrite, vfs_mountPoint::fs, kfree(), kmalloc(), kprintf(), memset(), fileDescriptor::mode, fileDescriptor::mp, NULL, taskStruct::oInfo, spinUnlock(), sprintf(), strcpy(), strstr(), strtok(), vfs_findMount(), and fileSystem::vfsOpenFile.
Referenced by _sys_stat(), elf_load_file(), execFile(), kern_openat(), kmod_load(), ldEnable(), sys_fopen(), sys_fstatat(), sys_openat(), sys_statfs(), sysExec(), sysMkDir(), and tcpdump_init().

| size_t fread | ( | void * | ptr, |
| size_t | size, | ||
| size_t | nmemb, | ||
| fileDescriptor_t * | fd | ||
| ) |
Definition at line 291 of file file.c.
References assert, file::fd, vfs_mountPoint::fs, fileDescriptor::mp, fileDescriptor::offset, and fileSystem::vfsRead.
Referenced by elf_load_file(), execFile(), kmod_load(), ldEnable(), read(), sys_fread(), sys_getdirentries(), sys_mmap(), sys_pread(), sys_read(), and sysExec().
| int fseek | ( | fileDescriptor_t * | , |
| long | , | ||
| int | |||
| ) |
Definition at line 326 of file file.c.
Referenced by elf_load_file(), execFile(), kmod_load(), ldEnable(), sys_mmap(), and sysExec().
| size_t fwrite | ( | void * | ptr, |
| int | size, | ||
| int | nmemb, | ||
| fileDescriptor_t * | fd | ||
| ) |
Definition at line 311 of file file.c.
Referenced by sys_fwrite(), sys_write(), and sysFwrite().
| int getchar | ( | ) |
Definition at line 346 of file atkbd.c.
References tty_foreground.
Referenced by sys_fgetc(), sys_pread(), and sys_read().
| int sys_fwrite | ( | struct thread * | , |
| struct sys_fwrite_args * | |||
| ) |
Definition at line 47 of file file.c.
References _current, sys_fwrite_args::buf, userFileDescriptorStruct::fd, sys_fwrite_args::fd, fwrite(), kprintf(), sys_fwrite_args::nbytes, thread::td_retval, taskStruct::term, and tty_print().

| int sysFseek | ( | userFileDescriptor * | , |
| long | , | ||
| int | |||
| ) |
| char* verifyDir | ( | const char * | path | ) |
| fileDescriptor_t* fdTable |