Browse Source

iwinfo: iwinfo_hardware_id_from_mtd() never writes, so do not request write access in mmap()

SVN-Revision: 30664
Jo-Philipp Wich 14 years ago
parent
commit
8ce7505b91
1 changed files with 1 additions and 1 deletions
  1. 1 1
      package/iwinfo/src/iwinfo_utils.c

+ 1 - 1
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)
 	{