From 6fecafad031fe3ec82ad5036da189d70a42f26c0 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Mon, 25 May 2015 13:54:40 +0200 Subject: [PATCH] state: mtd_get_meminfo: open path readonly instead of readwrite Signed-off-by: Marc Kleine-Budde --- common/state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/state.c b/common/state.c index 655c9a63e..88eb6add4 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;