From 04a340f14c53b1bd3a6060b6adf1a063dfd25bc5 Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sat, 10 Jan 2004 07:57:35 +0000 Subject: [PATCH] [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 Approved by: maintainer timeout --- benchmarks/rawio/Makefile | 1 + benchmarks/rawio/files/patch-ad | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/benchmarks/rawio/Makefile b/benchmarks/rawio/Makefile index d3a9498722f7..240326e89709 100644 --- a/benchmarks/rawio/Makefile +++ b/benchmarks/rawio/Makefile @@ -8,6 +8,7 @@ PORTNAME= rawio PORTVERSION= 1.2 +PORTREVISION= 1 CATEGORIES= benchmarks MASTER_SITES= ftp://ftp.lemis.com/pub/ diff --git a/benchmarks/rawio/files/patch-ad b/benchmarks/rawio/files/patch-ad index efb1cbc2d164..fa92520200be 100644 --- a/benchmarks/rawio/files/patch-ad +++ b/benchmarks/rawio/files/patch-ad @@ -1,6 +1,15 @@ ---- rawio.c~ Fri Mar 29 16:52:17 2002 -+++ rawio.c Fri Mar 29 16:53:49 2002 -@@ -358,7 +358,11 @@ +--- 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, @@ -10,5 +19,5 @@ + MAP_SHARED | MAP_ANON, +#endif -1, - 0 ); - if (childinfo == MAP_FAILED) + (off_t) 0 ); + #else