The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
ramdisk.h File Reference

a block device on a range of memory. More...

#include "block_device.h"
#include "common/stdint.h"

Go to the source code of this file.

Data Structures

struct  ramdisk_t

Functions

bool ramdisk_initialize (ramdisk_t *disk, void *data, uint32_t size)
 make a block device of 512-byte blocks on memory.

Detailed Description

a block device on a range of memory.

the root filesystem image that the bootloader loads as a module becomes a block device with this driver. writes change only the memory, so they are lost at the next boot.

Function Documentation

◆ ramdisk_initialize()

bool ramdisk_initialize ( ramdisk_t * disk,
void * data,
uint32_t size )

make a block device of 512-byte blocks on memory.

Parameters
diskthe ramdisk to set up.
datathe first byte of the image (a kernel pointer).
sizethe size of the image in bytes. a part block at the end is not used.
Returns
false if the image is smaller than one block.