rootfs/init.c
2024-01-13 13:19:22 -06:00

31 lines
427 B
C

/*****
*
* Mount rootfs filesystem for bootup
*
*****/
#include<stdint.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include"fs.h"
#include"vfs.h"
#include"init.h"
#include"err.h"
err_t init_mkrootfs(void)
{
FsHdr fs=vfs_mkfs(128);
if(fs_mount_root(&fs)==ENULL)
{
printf("error: cannot mount NULL filesystem\n");
return ENULL;
}
return EOK;
}
void init_releasefs(void)
{
vfs_free(&filesystem);
}