UbixOS V2 2.0

Functions
ubixfs.c File Reference
`#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>`
Include dependency graph for ubixfs.c:

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)

## Function Documentation

## ◆ readUbixFS()

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

Here is the call graph for this function:

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

Here is the call graph for this function:

## ◆ ubixFSUnlink()

void ubixFSUnlink | ( | char * | path,
|  | struct vfs_mountPoint * | mp
| ) |  |

Definition at line 306 of file ubixfs.c.

## ◆ writeFileByte()

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.

Here is the call graph for this function:

## ◆ writeUbixFS()

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

Here is the call graph for this function: