1 // sEXT2 - Simple File System Example
2 // Type Definition Language File
4 // structures are assumed to be aligned to double-word
5 // boundaries. fields are tightly packed, so reserved bits
6 // can be used to add neccesary padding
11 reserved byte[d.s.blocksize];
15 Block b[d.s.NumberofBlocks];
16 label b[literal(0)]: Superblock s;
17 label b[literal(1)]: Groupblock g;
20 structure Superblock subtype of Block {
25 int RootDirectoryInode;
29 structure Groupblock subtype of Block {
33 int GroupFreeBlockCount;
34 int GroupFreeInodeCount;
37 structure InodeTable subtype of Block {
38 Inode itable[d.s.NumberofInodes];
41 structure InodeBitmap subtype of Block {
42 bit inodebitmap[d.s.NumberofInodes];
45 structure BlockBitmap subtype of Block {
46 bit blockbitmap[d.s.NumberofBlocks];
51 int Blockptr[literal(12)];
55 structure DirectoryBlock subtype of Block {
56 DirectoryEntry de[d.s.blocksize/literal(128)];
59 structure DirectoryEntry {
60 byte name[literal(124)];