tape-kernel 1.0
a modular modern independent kernel
Loading...
Searching...
No Matches
ffs.c File Reference
#include "ffs.h"
#include "ide.h"
#include "../lib/err.h"
#include "../io/io.h"
Include dependency graph for ffs.c:

Go to the source code of this file.

Functions

void __ffsinit (void)
 ffsinit initializes the flat filesystem on disk
uint32_t __disksize (void)
 disksize returns the total disk size in kilobytes

Function Documentation

◆ __disksize()

uint32_t __disksize ( void )

disksize returns the total disk size in kilobytes

disksize is a function that queries the ide drive for its total sector count and converts it to kilobytes

using disksize is done with

#include "../fs/ffs.h" //or just ffs.h
uint32_t dsize = disksize();
#define disksize
Definition ffs.h:7
unsigned int uint32_t
Definition types.h:30
See also
idesize(), memsize()

Definition at line 65 of file ffs.c.

References idesize.

◆ __ffsinit()

void __ffsinit ( void )

ffsinit initializes the flat filesystem on disk

ffsinit is a function that reads and validates the boot sector checking for the 0x55 0xAA boot signature and verifying sector size it also creates an empty filesystem table if one doesnt exist yet

using ffsinit is done with

#include "../fs/ffs.h" //or just ffs.h
#define ffsinit
Definition ffs.h:6
See also
ideinit(), fsinit(), boot.s

Definition at line 22 of file ffs.c.

References assert, irsec, and iwrt.