Started work on proper tests.

STILL HAVING STUPID UNEXPLAINABLE NIL POINTERS.
This commit is contained in:
Caleb Gardner
2022-06-18 01:32:51 -05:00
parent 8613e35221
commit cde6a265a1
6 changed files with 121 additions and 22 deletions
+5 -1
View File
@@ -24,7 +24,7 @@ type superblock struct {
ExportTableStart uint64
}
func (s superblock) hasMagic() bool {
func (s superblock) checkMagic() bool {
return s.Magic == 0x73717368
}
@@ -32,6 +32,10 @@ func (s superblock) checkBlockLog() bool {
return s.BlockLog == uint16(math.Log2(float64(s.BlockSize)))
}
func (s superblock) checkVersion() bool {
return s.VerMaj == 4 && s.VerMin == 0
}
func (s superblock) uncompressedInodes() bool {
return s.Flags&0x1 == 0x1
}