[xiph-commits] r18537 - experimental/giles/rogg

giles at svn.xiph.org giles at svn.xiph.org
Tue Aug 14 16:24:53 PDT 2012


Author: giles
Date: 2012-08-14 16:24:53 -0700 (Tue, 14 Aug 2012)
New Revision: 18537

Modified:
   experimental/giles/rogg/rogg_pagedump.c
Log:
Don't open pagedump files rw.


Modified: experimental/giles/rogg/rogg_pagedump.c
===================================================================
--- experimental/giles/rogg/rogg_pagedump.c	2012-08-12 23:49:47 UTC (rev 18536)
+++ experimental/giles/rogg/rogg_pagedump.c	2012-08-14 23:24:53 UTC (rev 18537)
@@ -63,7 +63,7 @@
   rogg_page_header header;
 
   for (i = 1; i < argc; i++) {
-    f = open(argv[i], O_RDWR);
+    f = open(argv[i], O_RDONLY);
     if (f < 0) {
 	fprintf(stderr, "couldn't open '%s'\n", argv[i]);
 	continue;
@@ -73,7 +73,7 @@
 	close(f);
 	continue;
     }
-    p = mmap(0, s.st_size, PROT_READ|PROT_WRITE,
+    p = mmap(0, s.st_size, PROT_READ,
 	MAP_SHARED, f, 0);
     if (p == MAP_FAILED) {
 	fprintf(stderr, "couldn't mmap '%s'\n", argv[i]);



More information about the commits mailing list