I have to complete program which creates a simple filesystem by using an array of 1024 byte blocks by contiguous allocation and the following header:
also blocks 0-127 will be used to store dir entries, and i have to implement my own function which are at the end of the header. My main difficulty is with the direntries and how to store the in the disk structure which stores bytes?
typedef unsigned char Byte;
typedef struct Tblock Block;
Block disk ;
typedef struct Tdirentry Direntry;
char name; // sizeof(Direntry) == 64
// struct stat *buf;
typedef struct Tfiledata Filedata;
int myfgetc(Filedata * src); // read one byte
void myfputc(Byte x, Filedata * dst); //write one byte
Filedata * myopen ( const char * name, const char * code);
//open file for reading or writing -- return 0 for failure
void myclose(Filedata * ff); // close the file
Any help appreciated.