2022-11-14 21:46:44 -06:00
|
|
|
#include <errno.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#include "fuseactions.h"
|
|
|
|
|
|
|
|
unsigned char* fs;
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void MapFS(int fd)
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
fs = mmap(NULL, FSSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
|
|
|
if (fs == NULL)
|
|
|
|
{
|
|
|
|
perror("mmap failed");
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void UnmapFS()
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
munmap(fs, FSSIZE);
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void FormatFS()
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void LoadFS()
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void ListFS()
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void AddFileToFS(char* fname)
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void RemoveFileFromFS(char* fname)
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-11-17 19:43:46 -06:00
|
|
|
void ExtractFileFromFS(char* fname)
|
2022-11-14 21:46:44 -06:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|