UbixFS Class Reference

#include <ubixfs.h>

Inheritance diagram for UbixFS:

vfs_abstract

Public Member Functions

 UbixFS (device_t *)
 UbixFS (void)
virtual int vfs_close (fileDescriptor *)
virtual int vfs_closedir (DIR *)
virtual int vfs_format (device_t *)
virtual int vfs_init (void)
virtual int vfs_mkdir (const char *, mode_t)
virtual void * vfs_mknod (const char *, mode_t)
virtual int vfs_open (const char *, fileDescriptor *, int,...)
virtual int vfs_opendir (DIR *, const char *)
virtual int vfs_purge (void)
virtual size_t vfs_read (fileDescriptor *, void *, off_t, size_t)
virtual int vfs_readdir (DIR *, struct dirent *)
virtual int vfs_rename (const char *, const char *)
virtual int vfs_rmdir (const char *)
virtual int vfs_stop (void)
virtual int vfs_sync (void)
virtual int vfs_unlink (const char *)
virtual size_t vfs_write (fileDescriptor *, void *, off_t, size_t)
virtual ~UbixFS (void)

Protected Member Functions

blockRun get8FreeBlocks (uInt32)
blockRun getFreeBlock (void)
blockRun getFreeBlock (uInt32)
blockRun getFreeBlock (blockRun)
uInt32 getNextAG (void)
void * mknod (const char *, ubixfsInode *, mode_t)
void printFreeBlockList (uInt32)
void printSuperBlock (void)
void setFreeBlock (blockRun)

Protected Attributes

device_tdevice
signed char * freeBlockList
vfs_abstractnext
vfs_abstractprev
fileDescriptorroot
diskSuperBlocksuperBlock

Friends

class bTree

Detailed Description

Definition at line 132 of file ubixfs.h.


Constructor & Destructor Documentation

UbixFS::UbixFS ( void   ) 

Definition at line 13 of file ubixfs.cpp.

References freeBlockList, NULL, root, and superBlock.

UbixFS::UbixFS ( device_t  ) 

Definition at line 21 of file ubixfs.cpp.

References dev, freeBlockList, NULL, root, and superBlock.

UbixFS::~UbixFS ( void   )  [virtual]

Definition at line 986 of file ubixfs.cpp.

References freeBlockList.


Member Function Documentation

blockRun UbixFS::get8FreeBlocks ( uInt32   )  [protected]

Definition at line 782 of file ubixfs.cpp.

References freeBlockList, NULL, and superBlock.

blockRun UbixFS::getFreeBlock ( void   )  [protected]

Definition at line 777 of file ubixfs.cpp.

References getNextAG().

Referenced by getFreeBlock(), mknod(), and vfs_write().

blockRun UbixFS::getFreeBlock ( uInt32   )  [protected]

Definition at line 693 of file ubixfs.cpp.

References freeBlockList, NULL, and superBlock.

blockRun UbixFS::getFreeBlock ( blockRun   )  [protected]

Definition at line 616 of file ubixfs.cpp.

References freeBlockList, getFreeBlock(), NULL, and superBlock.

uInt32 UbixFS::getNextAG ( void   )  [protected]

Definition at line 760 of file ubixfs.cpp.

References superBlock.

Referenced by getFreeBlock().

void * UbixFS::mknod ( const char *  ,
ubixfsInode ,
mode_t   
) [protected]

Definition at line 835 of file ubixfs.cpp.

References assert, getFreeBlock(), getgid(), getuid(), MAX_FILENAME_LENGTH, memset(), NULL, strncpy(), superBlock, and UBIXFS_INODE_MAGIC.

Referenced by vfs_mkdir(), and vfs_mknod().

void UbixFS::printFreeBlockList ( uInt32   )  [protected]

Definition at line 966 of file ubixfs.cpp.

References freeBlockList, NULL, and superBlock.

void UbixFS::printSuperBlock ( void   )  [protected]

Definition at line 29 of file ubixfs.cpp.

References superBlock.

Referenced by vfs_init().

void UbixFS::setFreeBlock ( blockRun   )  [protected]

Definition at line 600 of file ubixfs.cpp.

References freeBlockList, NULL, and superBlock.

virtual int vfs_abstract::vfs_close ( fileDescriptor  )  [inline, virtual, inherited]

Definition at line 18 of file fsAbstract.h.

virtual int vfs_abstract::vfs_closedir ( DIR *   )  [inline, virtual, inherited]

Definition at line 26 of file fsAbstract.h.

int UbixFS::vfs_format ( device_t  )  [virtual]

Reimplemented from vfs_abstract.

Definition at line 118 of file ubixfs.cpp.

References assert, dev, bTreeHeader::firstDeleted, bTreeHeader::firstNodeOffset, getgid(), getuid(), INODE_DIRECTORY, memset(), NULL, strcpy(), bTreeHeader::treeDepth, bTreeHeader::treeLeafCount, bTreeHeader::treeWidth, UBIXFS_INODE_MAGIC, UBIXFS_MAGIC1, UBIXFS_MAGIC2, and UBIXFS_MAGIC3.

Referenced by main().

int UbixFS::vfs_init ( void   )  [virtual]

Reimplemented from vfs_abstract.

Definition at line 50 of file ubixfs.cpp.

References assert, bTree, freeBlockList, fileDescriptor::inode, memset(), NULL, printSuperBlock(), root, strcmp(), superBlock, UBIXFS_CLEAN, UBIXFS_MAGIC1, UBIXFS_MAGIC2, and UBIXFS_MAGIC3.

Referenced by main().

int UbixFS::vfs_mkdir ( const char *  ,
mode_t   
) [virtual]

Reimplemented from vfs_abstract.

Definition at line 891 of file ubixfs.cpp.

References assert, fileDescriptor::inode, INODE_DIRECTORY, MAX_FILENAME_LENGTH, memset(), mknod(), name, NULL, root, strlen(), and strncpy().

Referenced by main().

void * UbixFS::vfs_mknod ( const char *  ,
mode_t   
) [virtual]

Reimplemented from vfs_abstract.

Definition at line 305 of file ubixfs.cpp.

References mknod().

int UbixFS::vfs_open ( const char *  ,
fileDescriptor ,
int  ,
  ... 
) [virtual]

Reimplemented from vfs_abstract.

Definition at line 310 of file ubixfs.cpp.

References fileDescriptor::inode, NULL, fileDescriptor::offset, and fileDescriptor::size.

virtual int vfs_abstract::vfs_opendir ( DIR *  ,
const char *   
) [inline, virtual, inherited]

Definition at line 25 of file fsAbstract.h.

virtual int vfs_abstract::vfs_purge ( void   )  [inline, virtual, inherited]

Definition at line 35 of file fsAbstract.h.

size_t UbixFS::vfs_read ( fileDescriptor ,
void *  ,
off_t  ,
size_t   
) [virtual]

Reimplemented from vfs_abstract.

Definition at line 321 of file ubixfs.cpp.

References assert, fileDescriptor::inode, NULL, NUM_DIRECT_BLOCKS, and superBlock.

virtual int vfs_abstract::vfs_readdir ( DIR *  ,
struct dirent  
) [inline, virtual, inherited]

Definition at line 29 of file fsAbstract.h.

virtual int vfs_abstract::vfs_rename ( const char *  ,
const char *   
) [inline, virtual, inherited]

Definition at line 41 of file fsAbstract.h.

virtual int vfs_abstract::vfs_rmdir ( const char *   )  [inline, virtual, inherited]

Definition at line 28 of file fsAbstract.h.

int UbixFS::vfs_stop ( void   )  [virtual]

Reimplemented from vfs_abstract.

Definition at line 557 of file ubixfs.cpp.

References freeBlockList, fileDescriptor::inode, NULL, root, superBlock, and vfs_sync().

Referenced by main().

int UbixFS::vfs_sync ( void   )  [virtual]

Reimplemented from vfs_abstract.

Definition at line 588 of file ubixfs.cpp.

References freeBlockList, NULL, and superBlock.

Referenced by vfs_stop().

virtual int vfs_abstract::vfs_unlink ( const char *   )  [inline, virtual, inherited]

Definition at line 40 of file fsAbstract.h.

size_t UbixFS::vfs_write ( fileDescriptor ,
void *  ,
off_t  ,
size_t   
) [virtual]

Reimplemented from vfs_abstract.

Definition at line 387 of file ubixfs.cpp.

References assert, getFreeBlock(), fileDescriptor::inode, NULL, NUM_DIRECT_BLOCKS, and superBlock.


Friends And Related Function Documentation

friend class bTree [friend]

Definition at line 160 of file ubixfs.h.

Referenced by vfs_init().


Field Documentation

device_t* vfs_abstract::device [protected, inherited]

Definition at line 14 of file fsAbstract.h.

signed char* UbixFS::freeBlockList [protected]

Definition at line 134 of file ubixfs.h.

Referenced by get8FreeBlocks(), getFreeBlock(), printFreeBlockList(), setFreeBlock(), UbixFS(), vfs_init(), vfs_stop(), vfs_sync(), and ~UbixFS().

vfs_abstract* vfs_abstract::next [protected, inherited]

Definition at line 13 of file fsAbstract.h.

vfs_abstract* vfs_abstract::prev [protected, inherited]

Definition at line 12 of file fsAbstract.h.

fileDescriptor* UbixFS::root [protected]

Definition at line 136 of file ubixfs.h.

Referenced by UbixFS(), vfs_init(), vfs_mkdir(), and vfs_stop().

diskSuperBlock* UbixFS::superBlock [protected]

Definition at line 135 of file ubixfs.h.

Referenced by get8FreeBlocks(), getFreeBlock(), getNextAG(), mknod(), printFreeBlockList(), printSuperBlock(), setFreeBlock(), UbixFS(), vfs_init(), vfs_read(), vfs_stop(), vfs_sync(), and vfs_write().


The documentation for this class was generated from the following files:
Generated on Tue Dec 5 23:35:06 2006 for UbixOS V2 by  doxygen 1.4.7