[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: feature request: O_DIRECTIO could be used on Tru64
From: |
Jim Meyering |
Subject: |
Re: feature request: O_DIRECTIO could be used on Tru64 |
Date: |
Tue, 07 Feb 2006 23:34:53 +0100 |
"Lemley James - jlemle" <address@hidden> wrote:
> Hi coreutils fans, while attempting to use direct I/O with dd on Tru64
> 5.1B, I discovered that Tru64 doesn't define O_DIRECT as coreutils 5.93
> is expecting, but does define O_DIRECTIO which seems to act as I expect
> direct I/O to act.
>
> The open(2) man page states: O_DIRECTIO [Tru64 UNIX]
> Enables direct I/O on a file.
>
> Making this change to src/system.h allows the flag "direct" to be used
> with dd on Tru64, and also appears to affect how the coreutil "shred"
> opens a file.
Thanks for the patch.
I've applied one that's equivalent:
2006-02-07 Jim Meyering <address@hidden>
* src/system.h (!defined O_DIRECT): If O_DIRECTIO is defined (as it
is on Tru64), define O_DIRECT to that. Patch From James Lemley.
Index: src/system.h
===================================================================
RCS file: /fetish/cu/src/system.h,v
retrieving revision 1.141
retrieving revision 1.142
diff -u -p -u -r1.141 -r1.142
--- src/system.h 11 Jan 2006 08:22:34 -0000 1.141
+++ src/system.h 7 Feb 2006 22:32:50 -0000 1.142
@@ -156,6 +156,11 @@ initialize_exit_failure (int status)
# define R_OK 4
#endif
+#if !defined O_DIRECT && defined O_DIRECTIO
+/* Tru64 spells it `O_DIRECTIO'. */
+# define O_DIRECT O_DIRECTIO
+#endif
+
#if !defined O_DIRECT
# define O_DIRECT 0
#endif