diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-02-20 21:27:41 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-02-20 21:27:41 +0000 |
commit | 8ce7505b9124d242bcca4e8b1b2fc18aac4fa448 (patch) | |
tree | 5104ffc062a9dc269a191991d9097dc0a9fc374e /package | |
parent | 39902886f04f8ce8934f43a64afadf42ef2b2d15 (diff) | |
download | mtk-20170518-8ce7505b9124d242bcca4e8b1b2fc18aac4fa448.zip mtk-20170518-8ce7505b9124d242bcca4e8b1b2fc18aac4fa448.tar.gz mtk-20170518-8ce7505b9124d242bcca4e8b1b2fc18aac4fa448.tar.bz2 |
iwinfo: iwinfo_hardware_id_from_mtd() never writes, so do not request write access in mmap()
SVN-Revision: 30664
Diffstat (limited to 'package')
-rw-r--r-- | package/iwinfo/src/iwinfo_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/package/iwinfo/src/iwinfo_utils.c b/package/iwinfo/src/iwinfo_utils.c index 78ea52b..5ca1016 100644 --- a/package/iwinfo/src/iwinfo_utils.c +++ b/package/iwinfo/src/iwinfo_utils.c @@ -184,7 +184,7 @@ int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id *id) if ((fd = open(buf, O_RDONLY)) < 0) return -1; - bc = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_LOCKED, fd, 0); + bc = mmap(NULL, len, PROT_READ, MAP_PRIVATE|MAP_LOCKED, fd, 0); if ((void *)bc != MAP_FAILED) { |