[PATCH 1/9] state: mtd_get_meminfo: open path readonly instead of readwrite

Marc Kleine-Budde mkl at pengutronix.de
Tue May 26 04:37:45 PDT 2015


Signed-off-by: Marc Kleine-Budde <mkl at pengutronix.de>
---
 common/state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/state.c b/common/state.c
index cc0e168a7b99..c13f7a00c98c 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;
 
-- 
2.1.4




More information about the barebox mailing list