# 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 *fd)
int | getFreeBlocks (int count, fileDescriptor *fd)
void | syncBat (struct vfs_mountPoint *mp)

## Function Documentation

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

Definition at line 79 of file block.c.

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

Here is the call graph for this function:

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

Definition at line 96 of file block.c.

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

Referenced by ubixFSmkDir(), and writeUbixFS().

Here is the call graph for this function:

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

Definition at line 74 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, and device_interface::write.

Referenced by freeBlocks(), and getFreeBlocks().