Added bash script for testing during makefile test

This commit is contained in:
2022-11-25 20:55:43 -06:00
parent 4fcd64ea81
commit 81647a3100
10 changed files with 77 additions and 35 deletions
+8 -4
View File
@@ -1,6 +1,8 @@
#ifndef FUSE_H
#define FUSE_H
#include <sys/types.h>
#define DEFAULTINODEMAX 128
#define DEFAULTBLOCKSIZE 512 // Size in bytes
@@ -27,13 +29,15 @@ typedef struct BlockStruct
typedef struct InodeStruct
{
BlockStruct* dataBlock;
char filePath[256];
off_t fileSize;
BlockStruct dataBlock;
} InodeStruct;
typedef struct SuperBlockStruct
{
int blockCount;
int blockSize;
blksize_t blockSize;
blkcnt_t blockCount;
} SuperBlockStruct;
typedef struct FBLStruct
@@ -44,7 +48,7 @@ typedef struct FBLStruct
typedef struct FileSystemStruct
{
SuperBlockStruct superBlock;
FBLStruct freeList;
FBLStruct fbl;
InodeStruct inodes[DEFAULTINODEMAX];
} FileSystemStruct;
+6 -6
View File
@@ -7,11 +7,11 @@
void MapFS(FileSystemStruct* fs, int fd);
void UnmapFS(FileSystemStruct* fs);
void FormatFS();
void LoadFS();
void ListFS();
void AddFileToFS(char* fname);
void RemoveFileFromFS(char* fname);
void ExtractFileFromFS(char* fname);
void FormatFS(FileSystemStruct* fs);
void LoadFS(FileSystemStruct* fs);
void ListFS(FileSystemStruct* fs);
void AddFileToFS(FileSystemStruct* fs, char* fname);
void RemoveFileFromFS(FileSystemStruct* fs, char* fname);
void ExtractFileFromFS(FileSystemStruct* fs, char* fname);
#endif