6 #define LENGTH BLOCKSIZE*NUMBLOCK
7 #define NUMINODES BLOCKSIZE/56
11 char array[BLOCKSIZE];
20 int RootDirectoryInode;
29 int GroupFreeBlockCount;
30 int GroupFreeInodeCount;
35 char blocks[NUMBLOCK/8+1];
40 char inode[NUMINODES/8+1];
53 struct Inode entries[NUMINODES];
57 #define DIRECTORYENTRYSIZE 128
58 struct DirectoryEntry {
65 struct DirectoryBlock {
66 struct DirectoryEntry entries[BLOCKSIZE/128];
74 void createfile(struct block *ptr,char *filename, char *buf,int buflen);
75 void addtode(struct block *ptr, int inode, char * filename);
76 int getinode(struct block *ptr);
77 int getblock(struct block * ptr);
79 void removefile(char *filename, struct block *ptr);
80 void createlink(struct block *ptr,char *filename, char *linkname);
81 struct block * chmountdisk(char *filename);
82 void chunmountdisk(struct block *vptr);
83 struct block * mountdisk(char *filename);
84 void unmountdisk(struct block *vptr);
85 void closefile(struct block *ptr, int fd);
86 bool writefile(struct block *ptr, int fd, char *s);
87 int writefile(struct block *ptr, int fd, char *s, int len);
88 char readfile(struct block *ptr, int fd);
89 int readfile(struct block *ptr, int fd, char *buf, int len);
90 int openfile(struct block *ptr, char *filename);
92 void printdirectory(struct block *ptr);
93 void printfile(char *filename, struct block *ptr);
94 void printinodeblock(struct block* ptr);