summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/sysfs.c')
-rw-r--r--firmware/target/hosted/sysfs.c4
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 @@
static FILE* open_read(const char *file_name)
{
- FILE *f = fopen(file_name, "r");
+ FILE *f = fopen(file_name, "re");
if(f == NULL)
{
DEBUGF("ERROR %s: Can not open %s for reading.", __func__, file_name);
@@ -44,7 +44,7 @@ static FILE* open_read(const char *file_name)
static FILE* open_write(const char* file_name)
{
- FILE *f = fopen(file_name, "w");
+ FILE *f = fopen(file_name, "we");
if(f == NULL)
{
DEBUGF("ERROR %s: Can not open %s for writing.", __func__, file_name);