]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(direct_mode): Turn it on/off with directio, too.
authorJim Meyering <jim@meyering.net>
Tue, 8 Jun 2004 06:47:43 +0000 (06:47 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 8 Jun 2004 06:47:43 +0000 (06:47 +0000)
src/shred.c

index 44be403f5902bd1628ea8422b114e6e0bf6afe7d..92962b9ed3c3f4d98c63fc019708996f6dbe788d 100644 (file)
@@ -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
 }