ubixfs.h
ubixos/types.h
vfs/vfs.h
sys/device.h
mpi/mpi.h
ubixfs/dirCache.h
src/sys/include/pci/hd.h
src/sys/include/ubixos/init.h
src/sys/kernel/syscall.c
src/sys/ubixfs/block.c
src/sys/ubixfs/dirCache.c
src/sys/ubixfs/directory.c
src/sys/ubixfs/thread.c
src/sys/ubixfs/ubixfs.c
sys/thread.h
ubixos/sched.h
ubixos/types.h
sys/_types.h
vfs/file.h
sys/tss.h
mpi/mpi.h
vfs/vfs.h
vfs/mount.h
src/sys/include/ubixfs/ubixfs.h
ubixfs/dirCache.h
sys/sysproto.h
ubixos/elf.h
sys/signal.h
ubixos/tty.h
sys/device.h
src/sys/pci/hd.c
src/sys/ubixfs/directory.c
src/sys/ubixfs/block.c
src/sys/ubixfs/dirCache.c
src/sys/ubixfs/ubixfs.c
src/sys/init/main.c
src/sys/include/ubixfs/ubixfs.h
src/sys/kernel/syscall.c
src/sys/include/pci/hd.h
src/sys/ubixfs/thread.c
src/sys/include/ubixos/init.h
blockAllocationTableEntry
bootSect
directoryEntry
directoryList
partitionInformation
ubixDiskLabel
ubixDiskLabel::ubixPartitions
ubixFSInfo
blockSize
8
ubixfs_loadData
ubixFSmkDir
writeUbixFS
EOBC
-1
writeUbixFS
MAXUBIXPARTITIONS
16
typeContainer
2
typeDeleted
8
ubixFSUnlink
typeDirectory
4
ubixFSmkDir
typeFile
1
ubixfs_cacheFind
UBIXDISKMAGIC
((uInt32)0x45)
ubixfs_initialize
UBIXFS_ALIGN
size
(size + ((((size) % (UBIXFS_BLOCKSIZE_BYTES)) == 0)? 0 : ((UBIXFS_BLOCKSIZE_BYTES) - ((size) % (UBIXFS_BLOCKSIZE_BYTES)))))
openFileUbixFS
ubixfs_loadData
UBIXFS_BLOCKSIZE_BYTES
blockSize*512
ubixfs_loadData
ubixFSmkDir
directoryList * typedef struct directoryList* dirList_t dirList_t
int int addDirEntry (struct directoryEntry *dir, fileDescriptor *fd) addDirEntry struct directoryEntry * dir fileDescriptor * fd kmalloc kprintf memcpy fileDescriptor::offset readUbixFS fileDescriptor::size writeUbixFS x1000 ubixFSmkDir
int int freeBlocks (int block, fileDescriptor *fd) freeBlocks int block fileDescriptor * fd blockAllocationTableEntry::attributes ubixFSInfo::blockAllocationTable blockAllocationTableEntry::nextBlock syncBat
int int getFreeBlocks (int count, fileDescriptor *fd) getFreeBlocks int count fileDescriptor * fd blockAllocationTableEntry::attributes ubixFSInfo::batEntries ubixFSInfo::blockAllocationTable blockAllocationTableEntry::nextBlock syncBat x1 ubixFSmkDir writeUbixFS
int int readFile (char *file) readFile char * file
int int readUbixFS (fileDescriptor *fd, char *data, uInt32, long size) readUbixFS fileDescriptor * fd char * data uInt32 long size assert buffer fdEof kpanic NULL fileDescriptor::size addDirEntry ubixfs_init
void void syncBat (struct vfs_mountPoint *mp) syncBat struct vfs_mountPoint * mp ubixFSInfo::blockAllocationTable vfs_mountPoint::device device_node::devInfo vfs_mountPoint::diskLabel vfs_mountPoint::fsInfo device_interface::info vfs_mountPoint::partition ubixDiskLabel::partitions device_interface::write freeBlocks getFreeBlocks
int int ubixfs_init () ubixfs_init kpanic NULL openFileUbixFS readUbixFS ubixfs_initialize ubixFSmkDir ubixFSUnlink vfsRegisterFS writeUbixFS x1
int int ubixfs_initialize () ubixfs_initialize ubixfs_init
void void ubixfs_thread () ubixfs_thread
dirList_t dirList_t ubixFSLoadDir (char *) ubixFSLoadDir char * directoryList::dirCache dirList directoryList::dirName kmalloc directoryList::next directoryList::prev sprintf strcmp
int int ubixFSmkDir (char *dir, fileDescriptor *fd) ubixFSmkDir char * dir fileDescriptor * fd addDirEntry directoryEntry::attributes ubixFSInfo::blockAllocationTable blockSize directoryEntry::fileName getFreeBlocks kfree kmalloc directoryEntry::permissions blockAllocationTableEntry::realSector directoryEntry::size sprintf directoryEntry::startCluster typeDirectory UBIXFS_BLOCKSIZE_BYTES ubixfs_init
void void ubixFSUnlink (char *path, struct vfs_mountPoint *mp) ubixFSUnlink char * path struct vfs_mountPoint * mp 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 x1000 ubixfs_init
int int writeFileByte (int ch, fileDescriptor *fd, long offset) writeFileByte int ch fileDescriptor * fd long offset assert ubixFSInfo::blockAllocationTable fdOpen fdRead blockAllocationTableEntry::nextBlock NULL
int int writeUbixFS (fileDescriptor *fd, char *data, long offset, long size) writeUbixFS fileDescriptor * fd char * data long offset long size assert ubixFSInfo::blockAllocationTable blockSize EOBC directoryEntry::fileName getFreeBlocks kfree kmalloc blockAllocationTableEntry::nextBlock NULL blockAllocationTableEntry::realSector fileDescriptor::size directoryEntry::size directoryEntry::startCluster strcmp x1000 addDirEntry ubixfs_init

    /*****************************************************************************************
    Copyright(c)2002-2004TheUbixOSProject
    Allrightsreserved.

    Redistributionanduseinsourceandbinaryforms,withorwithoutmodification,are
    permittedprovidedthatthefollowingconditionsaremet:

    Redistributionsofsourcecodemustretaintheabovecopyrightnotice,thislistof
    conditions,thefollowingdisclaimerandthelistofauthors.Redistributionsinbinary
    formmustreproducetheabovecopyrightnotice,thislistofconditions,thefollowing
    disclaimerandthelistofauthorsinthedocumentationand/orothermaterialsprovided
    withthedistribution.NeitherthenameoftheUbixOSProjectnorthenamesofits
    contributorsmaybeusedtoendorseorpromoteproductsderivedfromthissoftware
    withoutspecificpriorwrittenpermission.

    THISSOFTWAREISPROVIDEDBYTHECOPYRIGHTHOLDERSANDCONTRIBUTORS"ASIS"ANDANY
    EXPRESSORIMPLIEDWARRANTIES,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOF
    MERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSEAREDISCLAIMED.INNOEVENTSHALL
    THECOPYRIGHTOWNERORCONTRIBUTORSBELIABLEFORANYDIRECT,INDIRECT,INCIDENTAL,
    SPECIAL,EXEMPLARY,ORCONSEQUENTIALDAMAGES(INCLUDING,BUTNOTLIMITEDTO,PROCUREMENT
    OFSUBSTITUTEGOODSORSERVICES;LOSSOFUSE,DATA,ORPROFITS;ORBUSINESSINTERRUPTION)
    HOWEVERCAUSEDANDONANYTHEORYOFLIABILITY,WHETHERINCONTRACT,STRICTLIABILITY,OR
    TORT(INCLUDINGNEGLIGENCEOROTHERWISE)ARISINGINANYWAYOUTOFTHEUSEOFTHIS
    SOFTWARE,EVENIFADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGE.

    $Id: include_2ubixfs_2ubixfs_8h.xml 88 2016-01-12 00:11:29Z reddawg $

    *****************************************************************************************/

    #ifndef_UBIXFS_H
    #define_UBIXFS_H

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

    #defineUBIXFS_BLOCKSIZE_BYTESblockSize*512
    #defineUBIXFS_ALIGN(size)(size+((((size)%(UBIXFS_BLOCKSIZE_BYTES))==0)?0:((UBIXFS_BLOCKSIZE_BYTES)-((size)%(UBIXFS_BLOCKSIZE_BYTES)))))

    #defineUBIXDISKMAGIC((uInt32)0x45)/*Thediskmagicnumber*/
    #defineMAXUBIXPARTITIONS16
    #defineblockSize8

    #defineEOBC-1

    #definetypeFile1
    #definetypeContainer2
    #definetypeDirectory4
    #definetypeDeleted8

    /*Start*/
    structdirectoryList{
    chardirName[256];
    char*dirCache;
    uInt32dirBlock;
    structdirectoryList*next;
    structdirectoryList*prev;
    };

    typedefstructdirectoryList*dirList_t;

    dirList_tubixFSLoadDir(char*);
    /*End*/

    //PartitionInformation
    structubixDiskLabel{
    uInt32magicNum;
    uInt32magicNum2;
    uInt16driveType;
    uInt16numPartitions;
    structubixPartitions{//thepartitiontable
    uInt32pSize;//numberofsectorsinpartition
    uInt32pOffset;//startingsector
    uInt32pFsSize;//filesystembasicfragmentsize
    uInt32pBatSize;//BATsize
    uInt8pFsType;//filesystemtype,seebelow
    uInt8pFrag;//filesystemfragmentsperblock
    }partitions[MAXUBIXPARTITIONS];
    };

    structpartitionInformation{
    uInt32size;//SizeInSectors
    uInt32startSector;//BaseSectorOfPartition
    uInt32blockAllocationTable;//BaseSectorOfBAT
    uInt32rootDirectory;//BaseSectorOfRootDirectory
    };

    //BlockAllocationTableEntry
    structblockAllocationTableEntry{
    longattributes;//BlockAttributes
    longrealSector;//RealSector
    longnextBlock;//SectorOfNextBlock
    longreserved;//Reserved
    };

    //UbixFSDirectoryEntry
    structdirectoryEntry{
    uInt32startCluster;//StartingClusterOfFile
    uInt32size;//SizeOfFile
    uInt32creationDate;//DateCreated
    uInt32lastModified;//DateLastModified
    uInt32uid;//UIDOfOwner
    uInt32gid;//GIDOfOwner
    uInt16attributes;//FilesAttributes
    uInt16permissions;//FilesPermissions
    charfileName[256];//FileName
    };

    structbootSect{
    uInt8jmp[4];
    uInt8id[6];
    uInt16version;
    uInt16tmp;
    uInt16fsStart;
    uInt16tmp2;
    uInt32krnl_start;
    uIntBytesPerSector;
    uIntSectersPerTrack;
    uIntTotalHeads;
    uInt32TotalSectors;
    uInt8code[479];
    };

    structubixFSInfo{
    structblockAllocationTableEntry*blockAllocationTable;
    structcacheNode*dirCache;
    uInt32batEntries;
    uInt32rootDir;
    };/*ubixFSInfo*/

    intreadFile(char*file);
    intwriteFileByte(intch,fileDescriptor*fd,longoffset);
    //intopenFileUbixFS(char*file,fileDescriptor*fd);
    intgetFreeBlocks(intcount,fileDescriptor*fd);
    //externstructubixDiskLabel*diskLabel;

    //GoodFunctions
    //voidinitUbixFS(structmountPoints*mp);

    intreadUbixFS(fileDescriptor*fd,char*data,uInt32,longsize);
    intwriteUbixFS(fileDescriptor*fd,char*data,longoffset,longsize);
    voidsyncBat(structvfs_mountPoint*mp);
    intfreeBlocks(intblock,fileDescriptor*fd);
    intaddDirEntry(structdirectoryEntry*dir,fileDescriptor*fd);
    voidubixFSUnlink(char*path,structvfs_mountPoint*mp);
    intubixFSmkDir(char*dir,fileDescriptor*fd);

    intubixfs_init();
    intubixfs_initialize();
    voidubixfs_thread();

    #endif

    /***
    $Log: include_2ubixfs_2ubixfs_8h.xml,v $
    Revision 1.4  2006/12/12 14:09:13  reddawg
    Changes

    Revision1.22006/12/0514:10:21reddawg
    WorkignDistro

    Revision1.1.1.12006/06/0112:46:14reddawg
    ubix2

    Revision1.22005/10/1200:13:37reddawg
    Removed

    Revision1.1.1.12005/09/2617:23:53reddawg
    nomessage

    Revision1.212004/09/1420:57:01reddawg
    Bugfixes:macroproblemoveroptamultiply

    Revision1.202004/08/0117:58:39flameshadow
    chg:fixedstringallocationbuginubixfs_cacheNew()

    Revision1.192004/07/2712:02:01reddawg
    chg:fixedmarksbugreadFiledidalookupwhichiswhyitlookedlikeitwaslooppingsomuch

    Revision1.182004/07/2309:10:06reddawg
    ubixfs:cleanedupsomefunctionsplayedwiththecachingabit
    vfs:renamedabunchoffunctions
    cleanedupafewmiscbugs

    Revision1.172004/07/2222:37:03reddawg
    CachingisworkingnowtheFSisextremelyfastbutneedstobeoptimizedtodo32bitcopiesover8bit

    Revision1.162004/07/2021:28:16flameshadow
    oops

    Revision1.142004/07/2019:36:49reddawg
    UBUTags

    Revision1.132004/07/1412:21:49reddawg
    ubixfs:enableUbixFstoubixfs_init
    ChangedStartupRoutines

    END
    ***/