The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
ramdisk.c File Reference
#include "ramdisk.h"
#include "common/memory.h"

Macros

#define RAMDISK_BLOCK_SIZE   512u

Functions

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

Macro Definition Documentation

◆ RAMDISK_BLOCK_SIZE

#define RAMDISK_BLOCK_SIZE   512u

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.