diff options
Diffstat (limited to 'firmware/target/hosted/sysfs.c')
-rw-r--r-- | firmware/target/hosted/sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/hosted/sysfs.c b/firmware/target/hosted/sysfs.c index 177f338911..1c3fe8c396 100644 --- a/firmware/target/hosted/sysfs.c +++ b/firmware/target/hosted/sysfs.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | static FILE* open_read(const char *file_name) | 33 | static FILE* open_read(const char *file_name) |
34 | { | 34 | { |
35 | FILE *f = fopen(file_name, "r"); | 35 | FILE *f = fopen(file_name, "re"); |
36 | if(f == NULL) | 36 | if(f == NULL) |
37 | { | 37 | { |
38 | DEBUGF("ERROR %s: Can not open %s for reading.", __func__, file_name); | 38 | DEBUGF("ERROR %s: Can not open %s for reading.", __func__, file_name); |
@@ -44,7 +44,7 @@ static FILE* open_read(const char *file_name) | |||
44 | 44 | ||
45 | static FILE* open_write(const char* file_name) | 45 | static FILE* open_write(const char* file_name) |
46 | { | 46 | { |
47 | FILE *f = fopen(file_name, "w"); | 47 | FILE *f = fopen(file_name, "we"); |
48 | if(f == NULL) | 48 | if(f == NULL) |
49 | { | 49 | { |
50 | DEBUGF("ERROR %s: Can not open %s for writing.", __func__, file_name); | 50 | DEBUGF("ERROR %s: Can not open %s for writing.", __func__, file_name); |