summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/common/file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/common/file.c b/firmware/common/file.c
index 38ae3cb912..27588f3597 100644
--- a/firmware/common/file.c
+++ b/firmware/common/file.c
@@ -54,6 +54,13 @@ int open(char* pathname, int flags)
char* name;
int namelen;
+ /* For now, we don't support writing */
+ if(flags & (O_WRONLY | O_RDWR))
+ {
+ errno = EROFS;
+ return -1;
+ }
+
if ( pathname[0] != '/' ) {
DEBUGF("'%s' is not an absolute path.\n",pathname);
DEBUGF("Only absolute pathnames supported at the moment\n");