summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-08 06:47:43 +0000
committerJim Meyering <jim@meyering.net>2004-06-08 06:47:43 +0000
commit62d6b980b27e15d7013aa24a0a1b89039ba2fe8e (patch)
tree2cfb0ef33489b9c31839a1ee7045fea722825768
parent8cb9d485595024eab02faa37f77f0bf2fc035ad7 (diff)
downloadcoreutils-62d6b980b27e15d7013aa24a0a1b89039ba2fe8e.tar.xz
(direct_mode): Turn it on/off with directio, too.
-rw-r--r--src/shred.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shred.c b/src/shred.c
index 44be403f5..92962b9ed 100644
--- a/src/shred.c
+++ b/src/shred.c
@@ -828,10 +828,10 @@ direct_mode (int fd, bool enable)
}
}
-#if HAVE_DIRECTIO && defined DIRECTIO_ON
+#if HAVE_DIRECTIO && defined DIRECTIO_ON && defined DIRECTIO_OFF
/* This is Solaris-specific. See the following for details:
http://docs.sun.com/db/doc/816-0213/6m6ne37so?q=directio&a=view */
- directio (fd, DIRECTIO_ON);
+ directio (fd, enable ? DIRECTIO_ON : DIRECTIO_OFF);
#endif
}