UbixFS Class Reference

#include <ubixfs.h>

Inheritance diagram for UbixFS:

vfs_abstract

Detailed Description

Definition at line 132 of file ubixfs.h.

Public Member Functions

 UbixFS (device_t *)
 UbixFS (void)
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 size_t vfs_read (fileDescriptor *, void *, off_t, size_t)
virtual int vfs_stop (void)
virtual int vfs_sync (void)
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

signed char * freeBlockList
fileDescriptorroot
diskSuperBlocksuperBlock

Friends

class bTree


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.

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.

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.

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().

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

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().

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 Sun Dec 3 02:38:15 2006 for UbixOS V2 by  doxygen 1.4.7