From f6660a90b4b895d3d17df901498dd687e5e62f95 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Fri, 26 Sep 2008 08:32:46 +0000 Subject: Open device in read-only mode if we're only going to read from it. Approved by: pjd --- benchmarks/raidtest/Makefile | 2 +- benchmarks/raidtest/files/raidtest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'benchmarks/raidtest') diff --git a/benchmarks/raidtest/Makefile b/benchmarks/raidtest/Makefile index 3d85ce3e2864..b03d811ea257 100644 --- a/benchmarks/raidtest/Makefile +++ b/benchmarks/raidtest/Makefile @@ -7,7 +7,7 @@ # PORTNAME= raidtest -PORTVERSION= 1.1 +PORTVERSION= 1.2 CATEGORIES= benchmarks MASTER_SITES= # none DISTFILES= # none diff --git a/benchmarks/raidtest/files/raidtest.c b/benchmarks/raidtest/files/raidtest.c index 309bcc1d414e..338c69364b5e 100644 --- a/benchmarks/raidtest/files/raidtest.c +++ b/benchmarks/raidtest/files/raidtest.c @@ -322,7 +322,7 @@ raidtest_test(int argc, char *argv[]) err(EXIT_FAILURE, "Cannot stat '%s' file", file); if ((sb.st_size % sizeof(struct iorec)) != 0) err(EXIT_FAILURE, "Invalid size of '%s' file", file); - fdd = open(dev, O_RDWR | O_DIRECT); + fdd = open(dev, (rdonly ? O_RDONLY : O_RDWR) | O_DIRECT); if (fdd < 0) err(EXIT_FAILURE, "Cannot open '%s' device", file); procs = malloc(sizeof(pid_t) * nprocs); -- cgit v1.2.3