UbixOS V2  2.0
ubixfs.h File Reference
#include <sys/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
 

Macros

#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) /* The disk magic number */
 
#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 struct directoryListdirList_t
 

Functions

int addDirEntry (struct directoryEntry *dir, fileDescriptor_t *fd)
 
int freeBlocks (int block, fileDescriptor_t *fd)
 
int getFreeBlocks (int count, fileDescriptor_t *fd)
 
int readFile (char *file)
 
int readUbixFS (fileDescriptor_t *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_t *fd)
 
void ubixFSUnlink (char *path, struct vfs_mountPoint *mp)
 
int writeFileByte (int ch, fileDescriptor_t *fd, long offset)
 
int writeUbixFS (fileDescriptor_t *fd, char *data, long offset, long size)
 

Macro Definition Documentation

◆ blockSize

#define blockSize   8

Definition at line 43 of file ubixfs.h.

◆ EOBC

#define EOBC   -1

Definition at line 45 of file ubixfs.h.

◆ MAXUBIXPARTITIONS

#define MAXUBIXPARTITIONS   16

Definition at line 42 of file ubixfs.h.

◆ typeContainer

#define typeContainer   2

Definition at line 48 of file ubixfs.h.

◆ typeDeleted

#define typeDeleted   8

Definition at line 50 of file ubixfs.h.

◆ typeDirectory

#define typeDirectory   4

Definition at line 49 of file ubixfs.h.

◆ typeFile

#define typeFile   1

Definition at line 47 of file ubixfs.h.

◆ UBIXDISKMAGIC

#define UBIXDISKMAGIC   ((uInt32)0x45) /* The disk magic number */

Definition at line 41 of file ubixfs.h.

◆ UBIXFS_ALIGN

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

Definition at line 39 of file ubixfs.h.

◆ UBIXFS_BLOCKSIZE_BYTES

#define UBIXFS_BLOCKSIZE_BYTES   blockSize*512

Definition at line 38 of file ubixfs.h.

Typedef Documentation

◆ dirList_t

typedef struct directoryList* dirList_t

Definition at line 61 of file ubixfs.h.

Function Documentation

◆ addDirEntry()

int addDirEntry ( struct directoryEntry dir,
fileDescriptor_t fd 
)

Definition at line 64 of file directory.c.

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

Referenced by ubixFSmkDir().

Here is the call graph for this function:

◆ freeBlocks()

int freeBlocks ( int  block,
fileDescriptor_t fd 
)

◆ getFreeBlocks()

int getFreeBlocks ( int  count,
fileDescriptor_t fd 
)

◆ readFile()

int readFile ( char *  file)

◆ readUbixFS()

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

◆ syncBat()

◆ ubixfs_init()

int ubixfs_init ( )

Definition at line 450 of file ubixfs.c.

References NULL, readUbixFS(), ubixfs_initialize(), and writeUbixFS().

Here is the call graph for this function:

◆ ubixfs_initialize()

int ubixfs_initialize ( )

◆ ubixfs_thread()

void ubixfs_thread ( )

◆ ubixFSLoadDir()

dirList_t ubixFSLoadDir ( char *  )

Definition at line 39 of file directory.c.

References directoryList::dirName, kmalloc(), and sprintf().

Here is the call graph for this function:

◆ ubixFSmkDir()

◆ ubixFSUnlink()

void ubixFSUnlink ( char *  path,
struct vfs_mountPoint mp 
)

Definition at line 306 of file ubixfs.c.

◆ writeFileByte()

◆ writeUbixFS()