#include <ubixos/types.h>
#include <sys/device.h>
#include <vfs/file.h>
Go to the source code of this file.
Data Structures | |
struct | blockAllocationTableEntry |
struct | bootSect |
Bootsector structure. More... | |
struct | directoryEntry |
UbixFS Directory Entry. More... | |
struct | partitionInformation |
struct | ubixDiskLabel |
Partition Information. More... | |
struct | ubixDiskLabel.drivePartitions |
struct | ubixFsInfo |
Defines | |
#define | UBIXDISKMAGIC ((uInt32)0x45) |
#define | MAXPARTITIONS 4 |
#define | blockSize 8 |
#define | blockByteSize blockSize*512 |
#define | EOBC -1 |
#define | typeFile 1 |
#define | typeContainer 2 |
#define | typeDirectory 4 |
#define | typeDeleted 8 |
Functions | |
int | readFile (char *file) |
int | writeFileByte (int ch, fileDescriptor *fd, long offset) |
int | openFileUbixFS (char *file, fileDescriptor *fd) |
int | mkDirUbixFS (char *dir, fileDescriptor *fd) |
int | getFreeBlocks (int count, fileDescriptor *fd) |
int | enableUbixFS () |
void | initUbixFS (struct mountPoints *mp) |
int | readUbixFS (fileDescriptor *fd, char *data, long offset, long size) |
int | writeUbixFS (fileDescriptor *fd, char *data, long offset, long size) |
void | syncBat (struct mountPoints *mp) |
int | freeBlocks (int block, fileDescriptor *fd) |
int | addDirEntry (struct directoryEntry *dir, fileDescriptor *fd) |
void | ubixFSUnlink (char *path, struct mountPoints *mp) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The disk magic number |
|
|
|
Registers UbixFS functions with the virtual file-system (using vfsRegisterFS). Returns 1 if a failure happened, and 0 if success. |
|
|
|
|
|
Sets up the Ubix filesystem with appropriate data. If the medium is a hard-drive (or any medium?), it looks in the partition table. |
|
Makes a directory with the name directory. Returns 0 |
|
Depending on fd->mode, it fills fd with data about the file (start, size, permissions etc.), if the string file is matched with a filename in the current directory. Returns 1 on success, and 0 on failure. The fileDescriptor struct definition can be found in VFS |
|
|
|
Reads part (or can be whole) of a file into the memory pointed to by data. Returns size if successful, and 0 on failure. |
|
|
|
Effectively erases the file or directory from the filesystem |
|
|
|
Writes part (or can be whole) of a file from the memory pointed to by data. Extends file if necessary. Returns size. |