53 lines
537 B
C
53 lines
537 B
C
#include <errno.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <sys/mman.h>
|
|
#include "fuseactions.h"
|
|
|
|
unsigned char* fs;
|
|
|
|
void mapfs(int fd)
|
|
{
|
|
fs = mmap(NULL, FSSIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
|
|
if (fs == NULL)
|
|
{
|
|
perror("mmap failed");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|
|
|
|
void unmapfs()
|
|
{
|
|
munmap(fs, FSSIZE);
|
|
}
|
|
|
|
void formatfs()
|
|
{
|
|
|
|
}
|
|
|
|
void loadfs()
|
|
{
|
|
|
|
}
|
|
|
|
void lsfs()
|
|
{
|
|
|
|
}
|
|
|
|
void addfilefs(char* fname)
|
|
{
|
|
|
|
}
|
|
|
|
void removefilefs(char* fname)
|
|
{
|
|
|
|
}
|
|
|
|
void extractfilefs(char* fname)
|
|
{
|
|
|
|
}
|