UbixOS V2 2.0

Functions
block.c File Reference
`#include <ubixfs/ubixfs.h>`
`#include <vfs/file.h>`
`#include <vfs/mount.h>`
Include dependency graph for block.c:

Go to the source code of this file.

## Functions
int | freeBlocks (int block, fileDescriptor_t *fd)
int | getFreeBlocks (int count, fileDescriptor_t *fd)
void | syncBat (struct vfs_mountPoint *mp)

## Function Documentation

## ◆ freeBlocks()

int freeBlocks | ( | int | block,
|  | fileDescriptor_t * | fd
| ) |  |

Definition at line 78 of file block.c.

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

Here is the call graph for this function:

## ◆ getFreeBlocks()

int getFreeBlocks | ( | int | count,
|  | fileDescriptor_t * | fd
| ) |  |

Definition at line 95 of file block.c.

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

Referenced by ubixFSmkDir(), and writeUbixFS().

Here is the call graph for this function:

## ◆ syncBat()

void syncBat | ( | struct vfs_mountPoint * | mp | ) |

Definition at line 73 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, ubixDiskLabel::ubixPartitions::pBatSize, ubixDiskLabel::ubixPartitions::pOffset, and device_interface::write.

Referenced by freeBlocks(), and getFreeBlocks().