diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2008-09-26 08:32:46 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2008-09-26 08:32:46 +0000 |
commit | f6660a90b4b895d3d17df901498dd687e5e62f95 (patch) | |
tree | d967ff88740ea597307822f79daf1ee3675253d6 /benchmarks/raidtest | |
parent | - Update to 0.9.9 (diff) |
Open device in read-only mode if we're only going to read from it.
Approved by: pjd
Diffstat (limited to 'benchmarks/raidtest')
-rw-r--r-- | benchmarks/raidtest/Makefile | 2 | ||||
-rw-r--r-- | benchmarks/raidtest/files/raidtest.c | 2 |
2 files changed, 2 insertions, 2 deletions
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); |