Rename End_of_file variable, implement platform indepenent memory_map.go

This commit is contained in:
j.laycock
2019-09-04 14:24:17 +01:00
parent 9aa0859697
commit cc756ddd79
4 changed files with 28 additions and 9 deletions

View File

@@ -75,7 +75,7 @@ func (v *Volume) maybeWriteSuperBlock() error {
mMap, exists := memory_map.FileMemoryMap[v.dataFile.Name()]
if exists {
if mMap.End_Of_File == -1 {
if mMap.End_of_file == -1 {
v.SuperBlock.version = needle.CurrentVersion
mMap.WriteMemory(0, uint64(len(v.SuperBlock.Bytes())), v.SuperBlock.Bytes())
}