8 #define LENGTH BLOCKSIZE*NUMBLOCK
9 #define NUMINODES BLOCKSIZE/56
13 char array[BLOCKSIZE];
22 int RootDirectoryInode;
31 int GroupFreeBlockCount;
32 int GroupFreeInodeCount;
37 char blocks[NUMBLOCK/8+1];
42 char inode[NUMINODES/8+1];
55 struct Inode entries[NUMINODES];
59 #define DIRECTORYENTRYSIZE 128
60 struct DirectoryEntry {
67 struct DirectoryBlock {
68 struct DirectoryEntry entries[BLOCKSIZE/128];
76 void createfile(struct block *ptr,char *filename, char *buf,int buflen);
77 void addtode(struct block *ptr, int inode, char * filename);
78 int getinode(struct block *ptr);
79 int getblock(struct block * ptr);
81 void removefile(char *filename, struct block *ptr);
82 void createlink(struct block *ptr,char *filename, char *linkname);
83 struct block * chmountdisk(char *filename);
84 void chunmountdisk(struct block *vptr);
85 struct block * mountdisk(char *filename);
86 void unmountdisk(struct block *vptr);
87 void closefile(struct block *ptr, int fd);
88 bool writefile(struct block *ptr, int fd, char *s);
89 int writefile2(struct block *ptr, int fd, char *s, int len);
90 char readfile(struct block *ptr, int fd);
91 int readfile2(struct block *ptr, int fd, char *buf, int len);
92 int openfile(struct block *ptr, char *filename);
94 void printdirectory(struct block *ptr);
95 void printfile(char *filename, struct block *ptr);
96 void printinodeblock(struct block* ptr);
97 unsigned long selfcheck2(struct block* d);