summaryrefslogtreecommitdiff
path: root/apps/plugins/battery_bench.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/battery_bench.c')
-rw-r--r--apps/plugins/battery_bench.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c
index 5c04892d61..165ce54634 100644
--- a/apps/plugins/battery_bench.c
+++ b/apps/plugins/battery_bench.c
@@ -336,7 +336,7 @@ static void flush_buffer(void* data)
336 if (in_usb_mode || (buf_idx == 0)) 336 if (in_usb_mode || (buf_idx == 0))
337 return; 337 return;
338 338
339 fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND); 339 fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND, 0666);
340 if (fd < 0) 340 if (fd < 0)
341 return; 341 return;
342 342
@@ -446,7 +446,7 @@ void thread(void)
446 rb->unregister_storage_idle_func(flush_buffer, true); 446 rb->unregister_storage_idle_func(flush_buffer, true);
447 447
448 /* log end of bench and exit reason */ 448 /* log end of bench and exit reason */
449 fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND); 449 fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT | O_APPEND, 0666);
450 if (fd >= 0) 450 if (fd >= 0)
451 { 451 {
452 rb->fdprintf(fd, "--Battery bench ended, reason: %s--\n", exit_reason); 452 rb->fdprintf(fd, "--Battery bench ended, reason: %s--\n", exit_reason);
@@ -525,7 +525,7 @@ int main(void)
525 fd = rb->open(BATTERY_LOG, O_RDONLY); 525 fd = rb->open(BATTERY_LOG, O_RDONLY);
526 if (fd < 0) 526 if (fd < 0)
527 { 527 {
528 fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT); 528 fd = rb->open(BATTERY_LOG, O_RDWR | O_CREAT, 0666);
529 if (fd >= 0) 529 if (fd >= 0)
530 { 530 {
531 rb->fdprintf(fd, 531 rb->fdprintf(fd,