ubixfs.h File Reference

#include <ubixos/types.h>
#include <vfs/vfs.h>
#include <sys/device.h>
#include <mpi/mpi.h>
#include <ubixfs/dirCache.h>

Include dependency graph for ubixfs.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  blockAllocationTableEntry
struct  bootSect
struct  directoryEntry
struct  directoryList
struct  partitionInformation
struct  ubixDiskLabel
struct  ubixDiskLabel::ubixPartitions
struct  ubixFSInfo

Defines

#define blockSize   8
#define EOBC   -1
#define MAXUBIXPARTITIONS   16
#define typeContainer   2
#define typeDeleted   8
#define typeDirectory   4
#define typeFile   1
#define UBIXDISKMAGIC   ((uInt32)0x45)
#define UBIXFS_ALIGN(size)   (size + ((((size) % (UBIXFS_BLOCKSIZE_BYTES)) == 0)? 0 : ((UBIXFS_BLOCKSIZE_BYTES) - ((size) % (UBIXFS_BLOCKSIZE_BYTES)))))
#define UBIXFS_BLOCKSIZE_BYTES   blockSize*512

Typedefs

typedef directoryListdirList_t

Functions

int addDirEntry (struct directoryEntry *dir, fileDescriptor *fd)
int freeBlocks (int block, fileDescriptor *fd)
int getFreeBlocks (int count, fileDescriptor *fd)
int readFile (char *file)
int readUbixFS (fileDescriptor *fd, char *data, uInt32, long size)
void syncBat (struct vfs_mountPoint *mp)
int ubixfs_init ()
int ubixfs_initialize ()
void ubixfs_thread ()
dirList_t ubixFSLoadDir (char *)
int ubixFSmkDir (char *dir, fileDescriptor *fd)
void ubixFSUnlink (char *path, struct vfs_mountPoint *mp)
int writeFileByte (int ch, fileDescriptor *fd, long offset)
int writeUbixFS (fileDescriptor *fd, char *data, long offset, long size)


Define Documentation

#define blockSize   8

Definition at line 45 of file ubixfs.h.

Referenced by ubixfs_loadData(), ubixFSmkDir(), and writeUbixFS().

#define EOBC   -1

Definition at line 48 of file ubixfs.h.

Referenced by writeUbixFS().

#define MAXUBIXPARTITIONS   16

Definition at line 44 of file ubixfs.h.

#define typeContainer   2

Definition at line 52 of file ubixfs.h.

#define typeDeleted   8

Definition at line 54 of file ubixfs.h.

Referenced by ubixFSUnlink().

#define typeDirectory   4

Definition at line 53 of file ubixfs.h.

Referenced by ubixFSmkDir().

#define typeFile   1

Definition at line 51 of file ubixfs.h.

Referenced by ubixfs_cacheFind().

#define UBIXDISKMAGIC   ((uInt32)0x45)

Definition at line 43 of file ubixfs.h.

Referenced by ubixfs_initialize().

#define UBIXFS_ALIGN ( size   )     (size + ((((size) % (UBIXFS_BLOCKSIZE_BYTES)) == 0)? 0 : ((UBIXFS_BLOCKSIZE_BYTES) - ((size) % (UBIXFS_BLOCKSIZE_BYTES)))))

Definition at line 41 of file ubixfs.h.

Referenced by openFileUbixFS(), and ubixfs_loadData().

#define UBIXFS_BLOCKSIZE_BYTES   blockSize*512

Definition at line 40 of file ubixfs.h.

Referenced by ubixfs_loadData(), and ubixFSmkDir().


Typedef Documentation

typedef struct directoryList* dirList_t

Definition at line 65 of file ubixfs.h.


Function Documentation

int addDirEntry ( struct directoryEntry dir,
fileDescriptor fd 
)

Definition at line 66 of file directory.c.

References kmalloc(), kprintf(), memcpy(), fileDescriptorStruct::offset, readUbixFS(), fileDescriptorStruct::size, writeUbixFS(), and x1000.

Referenced by ubixFSmkDir().

Here is the call graph for this function:

int freeBlocks ( int  block,
fileDescriptor fd 
)

Definition at line 79 of file block.c.

References blockAllocationTableEntry::attributes, ubixFSInfo::blockAllocationTable, vfs_mountPoint::fsInfo, fileDescriptorStruct::mp, blockAllocationTableEntry::nextBlock, and syncBat().

Here is the call graph for this function:

int getFreeBlocks ( int  count,
fileDescriptor fd 
)

Definition at line 96 of file block.c.

References blockAllocationTableEntry::attributes, ubixFSInfo::batEntries, ubixFSInfo::blockAllocationTable, vfs_mountPoint::fsInfo, fileDescriptorStruct::mp, blockAllocationTableEntry::nextBlock, syncBat(), and x1.

Referenced by ubixFSmkDir(), and writeUbixFS().

Here is the call graph for this function:

int readFile ( char *  file  ) 

int readUbixFS ( fileDescriptor fd,
char *  data,
uInt32  ,
long  size 
)

Definition at line 194 of file ubixfs.c.

References assert, fileDescriptorStruct::cacheNode, fdEof, vfs_mountPoint::fsInfo, cacheNode::info, kpanic(), fileDescriptorStruct::mp, NULL, cacheNode::present, fileDescriptorStruct::size, and fileDescriptorStruct::status.

Referenced by addDirEntry(), and ubixfs_init().

Here is the call graph for this function:

void syncBat ( struct vfs_mountPoint mp  ) 

Definition at line 74 of file block.c.

References ubixFSInfo::blockAllocationTable, vfs_mountPoint::device, device_node::devInfo, vfs_mountPoint::diskLabel, vfs_mountPoint::fsInfo, device_interface::info, vfs_mountPoint::partition, ubixDiskLabel::partitions, and device_interface::write.

Referenced by freeBlocks(), and getFreeBlocks().

int ubixfs_init (  ) 

Definition at line 456 of file ubixfs.c.

References kpanic(), NULL, openFileUbixFS(), readUbixFS(), ubixfs_initialize(), ubixFSmkDir(), ubixFSUnlink(), vfsRegisterFS(), writeUbixFS(), and x1.

Here is the call graph for this function:

int ubixfs_initialize (  ) 

Referenced by ubixfs_init().

void ubixfs_thread (  ) 

dirList_t ubixFSLoadDir ( char *   ) 

Definition at line 41 of file directory.c.

References directoryList::dirCache, dirList, directoryList::dirName, kmalloc(), directoryList::next, directoryList::prev, sprintf(), and strcmp().

Here is the call graph for this function:

int ubixFSmkDir ( char *  dir,
fileDescriptor fd 
)

Definition at line 94 of file directory.c.

References addDirEntry(), directoryEntry::attributes, ubixFSInfo::blockAllocationTable, blockSize, vfs_mountPoint::device, device_node::devInfo, vfs_mountPoint::diskLabel, directoryEntry::fileName, vfs_mountPoint::fsInfo, getFreeBlocks(), device_interface::info, kfree(), kmalloc(), fileDescriptorStruct::mp, vfs_mountPoint::partition, ubixDiskLabel::partitions, directoryEntry::permissions, blockAllocationTableEntry::realSector, directoryEntry::size, sprintf(), directoryEntry::startCluster, typeDirectory, UBIXFS_BLOCKSIZE_BYTES, and device_interface::write.

Referenced by ubixfs_init().

Here is the call graph for this function:

void ubixFSUnlink ( char *  path,
struct vfs_mountPoint mp 
)

Definition at line 309 of file ubixfs.c.

References ubixFSInfo::blockAllocationTable, vfs_mountPoint::device, device_node::devInfo, vfs_mountPoint::diskLabel, directoryEntry::fileName, vfs_mountPoint::fsInfo, device_interface::info, kmalloc(), kprintf(), vfs_mountPoint::partition, ubixDiskLabel::partitions, device_interface::read, ubixFSInfo::rootDir, strcmp(), typeDeleted, device_interface::write, and x1000.

Referenced by ubixfs_init().

Here is the call graph for this function:

int writeFileByte ( int  ch,
fileDescriptor fd,
long  offset 
)

Definition at line 118 of file ubixfs.c.

References assert, ubixFSInfo::blockAllocationTable, vfs_mountPoint::diskLabel, fdOpen, fdRead, vfs_mountPoint::fsInfo, fileDescriptorStruct::mp, blockAllocationTableEntry::nextBlock, NULL, vfs_mountPoint::partition, ubixDiskLabel::partitions, ubixDiskLabel::ubixPartitions::pBatSize, fileDescriptorStruct::start, and fileDescriptorStruct::status.

int writeUbixFS ( fileDescriptor fd,
char *  data,
long  offset,
long  size 
)

Definition at line 232 of file ubixfs.c.

References assert, ubixFSInfo::blockAllocationTable, blockSize, fileDescriptorStruct::buffer, vfs_mountPoint::device, device_node::devInfo, vfs_mountPoint::diskLabel, EOBC, directoryEntry::fileName, fileDescriptorStruct::fileName, vfs_mountPoint::fsInfo, getFreeBlocks(), device_interface::info, kfree(), kmalloc(), fileDescriptorStruct::mp, blockAllocationTableEntry::nextBlock, NULL, vfs_mountPoint::partition, ubixDiskLabel::partitions, device_interface::read, blockAllocationTableEntry::realSector, fileDescriptorStruct::size, directoryEntry::size, fileDescriptorStruct::start, directoryEntry::startCluster, strcmp(), device_interface::write, and x1000.

Referenced by addDirEntry(), and ubixfs_init().

Here is the call graph for this function:


Generated on Fri Dec 15 11:21:12 2006 for UbixOS V2 by  doxygen 1.4.7