summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/cpufreq-linux.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/cpufreq-linux.c')
-rw-r--r--firmware/target/hosted/cpufreq-linux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/hosted/cpufreq-linux.c b/firmware/target/hosted/cpufreq-linux.c
index d622cf1d74..2083f00f26 100644
--- a/firmware/target/hosted/cpufreq-linux.c
+++ b/firmware/target/hosted/cpufreq-linux.c
@@ -31,7 +31,7 @@
31 31
32static FILE* open_read(const char* file_name) 32static FILE* open_read(const char* file_name)
33{ 33{
34 FILE *f = fopen(file_name, "r"); 34 FILE *f = fopen(file_name, "re");
35 if(f == NULL) 35 if(f == NULL)
36 { 36 {
37 DEBUGF("ERROR %s: Can not open %s for reading.", __func__, file_name); 37 DEBUGF("ERROR %s: Can not open %s for reading.", __func__, file_name);
@@ -83,7 +83,7 @@ void cpufreq_available_governors(char* governors, int governors_size, int cpu)
83 83
84static FILE* open_write(const char* file_name) 84static FILE* open_write(const char* file_name)
85{ 85{
86 FILE *f = fopen(file_name, "w"); 86 FILE *f = fopen(file_name, "we");
87 if(f == NULL) 87 if(f == NULL)
88 { 88 {
89 DEBUGF("ERROR %s: Can not open %s for writing.", __func__, file_name); 89 DEBUGF("ERROR %s: Can not open %s for writing.", __func__, file_name);