summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2015-05-26 13:37:45 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-05-26 14:33:18 +0200
commit0dadc9d82b1f2c57b55cc679fddbfa89daff76a2 (patch)
tree4d0561de5c1901e43631300e6e83f4c753643290
parent290dd6507451f109b6d4e5f4781c227089932e55 (diff)
downloadbarebox-0dadc9d82b1f2c57b55cc679fddbfa89daff76a2.tar.gz
barebox-0dadc9d82b1f2c57b55cc679fddbfa89daff76a2.tar.xz
state: mtd_get_meminfo: open path readonly instead of readwrite
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/state.c b/common/state.c
index 655c9a63e3..88eb6add4d 100644
--- a/common/state.c
+++ b/common/state.c
@@ -900,7 +900,7 @@ static int mtd_get_meminfo(const char *path, struct mtd_info_user *meminfo)
{
int fd, ret;
- fd = open(path, O_RDWR);
+ fd = open(path, O_RDONLY);
if (fd < 0)
return fd;