ports/benchmarks/rawio/files/patch-ad
Edwin Groothuis 04a340f14c [PATCH] benchmarks/rawio has a bug in commandline option parser
run rawio with -s option(size of raw disk device), as follows:
	    % rawio -a -s 30029328k -v 1 /dev/ad4c
	returned:
	    Invalid length specification: -v

	in source rawio.c, it skips parsing argument at one point.

PR:		ports/58567
Submitted by:	OOTOMO Hiroyuki <ootomo@za.wakwak.com>
Approved by:	maintainer timeout
2004-01-10 07:57:35 +00:00

23 lines
512 B
Text

--- rawio.c.orig Sun Nov 26 19:28:19 2000
+++ rawio.c Fri Jan 9 23:53:28 2004
@@ -423,7 +423,7 @@
printf ("No arg to n flag\n");
break;
}
- filesize = sizespec (argv [++i]);
+ filesize = sizespec (arg);
break;
case 'S':
@@ -580,7 +580,11 @@
childinfo = mmap (NULL,
nproc * sizeof (struct childinfo),
PROT_READ | PROT_WRITE,
+#ifdef MAP_INHERIT
MAP_INHERIT | MAP_SHARED | MAP_ANON,
+#else
+ MAP_SHARED | MAP_ANON,
+#endif
-1,
(off_t) 0 );
#else