UbixOS
2.0
|
#include <ubixfs/ubixfs.h>
#include <ubixfs/dirCache.h>
#include <vfs/vfs.h>
#include <ubixos/sched.h>
#include <ubixos/kpanic.h>
#include <ubixos/exec.h>
#include <lib/kmalloc.h>
#include <string.h>
#include <lib/kprintf.h>
#include <assert.h>
Go to the source code of this file.
Functions | |
int | readUbixFS (fileDescriptor_t *fd, char *data, uInt32 offset, long size) |
int | ubixfs_init () |
int | ubixfs_initialize (struct vfs_mountPoint *mp) |
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) |
int readUbixFS | ( | fileDescriptor_t * | fd, |
char * | data, | ||
uInt32 | offset, | ||
long | size | ||
) |
Definition at line 192 of file ubixfs.c.
References assert, buffer, fileDescriptor::cacheNode, fdEof, vfs_mountPoint::fsInfo, cacheNode::info, kpanic(), fileDescriptor::mp, NULL, cacheNode::present, fileDescriptor::size, and fileDescriptor::status.
Referenced by addDirEntry(), and ubixfs_init().
int ubixfs_init | ( | ) |
Definition at line 450 of file ubixfs.c.
References NULL, readUbixFS(), ubixfs_initialize(), and writeUbixFS().
int ubixfs_initialize | ( | struct vfs_mountPoint * | mp | ) |
Definition at line 371 of file ubixfs.c.
References assert, cacheNode::attributes, ubixFSInfo::batEntries, ubixFSInfo::blockAllocationTable, vfs_mountPoint::device, device_node::devInfo, ubixFSInfo::dirCache, vfs_mountPoint::diskLabel, vfs_mountPoint::fsInfo, cacheNode::info, device_interface::info, kmalloc(), kprintf(), ubixDiskLabel::magicNum, ubixDiskLabel::magicNum2, vfs_mountPoint::partition, ubixDiskLabel::partitions, ubixDiskLabel::ubixPartitions::pBatSize, cacheNode::permissions, ubixDiskLabel::ubixPartitions::pOffset, cacheNode::present, device_interface::read, blockAllocationTableEntry::realSector, ubixFSInfo::rootDir, cacheNode::size, cacheNode::startCluster, UBIXDISKMAGIC, and ubixfs_cacheNew().
Referenced by ubixfs_init().
void ubixFSUnlink | ( | char * | path, |
struct vfs_mountPoint * | mp | ||
) |
int writeFileByte | ( | int | ch, |
fileDescriptor_t * | fd, | ||
long | offset | ||
) |
Definition at line 116 of file ubixfs.c.
References assert, blockAllocationTableEntry::attributes, ubixFSInfo::batEntries, ubixFSInfo::blockAllocationTable, fileDescriptor::buffer, vfs_mountPoint::device, device_node::devInfo, vfs_mountPoint::diskLabel, fdOpen, fdRead, fileDescriptor::fileName, directoryEntry::fileName, vfs_mountPoint::fsInfo, device_interface::info, kfree(), kmalloc(), fileDescriptor::mp, blockAllocationTableEntry::nextBlock, NULL, vfs_mountPoint::partition, ubixDiskLabel::partitions, ubixDiskLabel::ubixPartitions::pBatSize, ubixDiskLabel::ubixPartitions::pOffset, device_interface::read, blockAllocationTableEntry::realSector, fileDescriptor::size, directoryEntry::size, fileDescriptor::start, fileDescriptor::status, strcmp(), and device_interface::write.
int writeUbixFS | ( | fileDescriptor_t * | fd, |
char * | data, | ||
long | offset, | ||
long | size | ||
) |
Definition at line 229 of file ubixfs.c.
References assert, ubixFSInfo::blockAllocationTable, blockSize, fileDescriptor::buffer, vfs_mountPoint::device, device_node::devInfo, vfs_mountPoint::diskLabel, EOBC, fileDescriptor::fileName, directoryEntry::fileName, vfs_mountPoint::fsInfo, getFreeBlocks(), device_interface::info, kfree(), kmalloc(), fileDescriptor::mp, blockAllocationTableEntry::nextBlock, NULL, vfs_mountPoint::partition, ubixDiskLabel::partitions, ubixDiskLabel::ubixPartitions::pOffset, device_interface::read, blockAllocationTableEntry::realSector, fileDescriptor::size, directoryEntry::size, fileDescriptor::start, directoryEntry::startCluster, strcmp(), and device_interface::write.
Referenced by addDirEntry(), and ubixfs_init().