summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorrillig <rillig>2006-10-22 04:36:12 +0000
committerrillig <rillig>2006-10-22 04:36:12 +0000
commit66dafe29c1b7769b3c880dc4f716855dc3bfa2e5 (patch)
treeb1c923e91730f9af1c97259283b589642c0c7653 /benchmarks
parent25f727c146980d9e292f755d38dcb5d3dd3deee8 (diff)
downloadpkgsrc-66dafe29c1b7769b3c880dc4f716855dc3bfa2e5.tar.gz
Not every system has O_DIRECT ... not even NetBSD.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/blogbench/distinfo4
-rw-r--r--benchmarks/blogbench/patches/patch-ad26
2 files changed, 19 insertions, 11 deletions
diff --git a/benchmarks/blogbench/distinfo b/benchmarks/blogbench/distinfo
index d815ed1d525..85a3f8c3d5a 100644
--- a/benchmarks/blogbench/distinfo
+++ b/benchmarks/blogbench/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2006/10/15 12:53:04 xtraeme Exp $
+$NetBSD: distinfo,v 1.4 2006/10/22 04:36:12 rillig Exp $
SHA1 (blogbench-1.0.tar.bz2) = 3e667bc9ebfee8751c28508a1840a10b9bdfc099
RMD160 (blogbench-1.0.tar.bz2) = b688e83c06d45986d592a4fc6a6f5f59ade3da7a
@@ -6,6 +6,6 @@ Size (blogbench-1.0.tar.bz2) = 103355 bytes
SHA1 (patch-aa) = 77c48f0e50aeeec341d7d127564839f526a86e1f
SHA1 (patch-ab) = 9db1070408e2afd12272e01a62d5ea8f2802c1df
SHA1 (patch-ac) = 72ce26dc25b1c2adf9b6d8835852c6ff7ddc1d84
-SHA1 (patch-ad) = e353b458af302aa0f9afd8811d11aafb3ed19010
+SHA1 (patch-ad) = dab09cd5e678cc5ccce62ffac365b6a61df14ee6
SHA1 (patch-ae) = 01b8dcb0641941d70dd056ae2026b83fb16be954
SHA1 (patch-af) = 8c16af43c281d28446dc2b976662c64b02cf3269
diff --git a/benchmarks/blogbench/patches/patch-ad b/benchmarks/blogbench/patches/patch-ad
index 1eea96cdcd5..11cf2a720ee 100644
--- a/benchmarks/blogbench/patches/patch-ad
+++ b/benchmarks/blogbench/patches/patch-ad
@@ -1,19 +1,27 @@
-$NetBSD: patch-ad,v 1.1 2006/10/15 12:53:04 xtraeme Exp $
+$NetBSD: patch-ad,v 1.2 2006/10/22 04:36:12 rillig Exp $
--- src/helpers.c.orig 2005-02-11 15:46:26.000000000 +0100
-+++ src/helpers.c 2006-10-15 13:25:58.000000000 +0200
-@@ -49,8 +49,13 @@
++++ src/helpers.c 2006-10-22 06:33:08.000000000 +0200
+@@ -48,9 +48,20 @@ int create_dummy_file(const char * const
+ size_t towrite;
ssize_t written;
int fd;
-
+-
- if ((fd = open(file_name, O_CREAT | O_TRUNC | O_WRONLY,
- (mode_t) 0600)) == -1) {
-+ if (do_directio)
-+ fd = open(file_name, O_CREAT|O_TRUNC|O_WRONLY|O_DIRECT,
-+ (mode_t)0600);
-+ else
-+ fd = open(file_name, O_CREAT|O_TRUNC|O_WRONLY, (mode_t)0600);
++ mode_t m;
+
++#if defined(O_DIRECT)
++ m = O_CREAT|O_TRUNC|O_WRONLY|(do_directio ? O_DIRECT : 0);
++#else
++ if (do_directio) {
++ reentrant_printf("open: O_DIRECT is not supported on this system.\n");
++ return -1;
++ }
++ m = O_CREAT|O_TRUNC|O_WRONLY;
++#endif
++
++ fd = open(file_name, m, (mode_t)0600);
+ if (fd == -1) {
if (errno != ENOENT) {
reentrant_printf("open(\"%s\"): %s\n",