From 70877ebd50272161ed988fe2001b9a5aee5997dd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 29 Dec 2015 19:20:51 +1100 Subject: [PATCH] HAL_QURT: fixed open of new storage file --- libraries/AP_HAL_QURT/mainapp/mainapp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_HAL_QURT/mainapp/mainapp.cpp b/libraries/AP_HAL_QURT/mainapp/mainapp.cpp index c8752a03d7..cca09d0667 100644 --- a/libraries/AP_HAL_QURT/mainapp/mainapp.cpp +++ b/libraries/AP_HAL_QURT/mainapp/mainapp.cpp @@ -65,7 +65,7 @@ static void get_storage(void) if (ardupilot_get_storage(buf, sizeof(buf)) != 0) { return; } - int fd = open(STORAGE_FILE ".new", O_WRONLY); + int fd = open(STORAGE_FILE ".new", O_WRONLY|O_CREAT|O_TRUNC, 0644); if (fd == -1) { printf("Unable to open %s - %s\n", STORAGE_FILE ".new", strerror(errno)); }