From 860c1c6308ff265cc88e98ea5184591177019127 Mon Sep 17 00:00:00 2001 From: Terence Boldt Date: Tue, 15 Dec 2020 21:51:28 -0500 Subject: [PATCH] Add file sync to prevent data loss on power-off --- RaspberryPi/Driver.go | 1 + 1 file changed, 1 insertion(+) diff --git a/RaspberryPi/Driver.go b/RaspberryPi/Driver.go index 7d98eb9..31b38f4 100644 --- a/RaspberryPi/Driver.go +++ b/RaspberryPi/Driver.go @@ -262,6 +262,7 @@ func main() { writeBlock(buffer) file.WriteAt(buffer, int64(block) * 512) + file.Sync() break case GetTimeCommand: /*