]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Linux PPC: fix the constant used for O_DIRECT
authorPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 31 Jan 2024 06:48:52 +0000 (07:48 +0100)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Wed, 31 Jan 2024 06:48:52 +0000 (07:48 +0100)
There are two defined

$ grep -rI O_DIRECT /usr/include/* | grep -v ORY | grep -v __
/usr/include/asm/fcntl.h:#define O_DIRECT       0400000 /* direct disk access hint */
/usr/include/asm-generic/fcntl.h:#define O_DIRECT       00040000        /* direct disk access hint */

and of course I used the wrong one. The non-generic value is the right one.

include/vki/vki-ppc32-linux.h
include/vki/vki-ppc64-linux.h

index 9d02e70d4fa1abe38cf6eeeee21892cd38554862..6e6ca00da8ba0dec4409952ffebadf0c8892a2ee 100644 (file)
@@ -314,8 +314,8 @@ struct vki_sigcontext {
 #define VKI_O_TRUNC            01000           /* not fcntl */
 #define VKI_O_APPEND           02000
 #define VKI_O_NONBLOCK         04000
-#define VKI_O_DIRECT           040000
-#define VKI_O_LARGEFILE     0200000
+#define VKI_O_DIRECT          0400000
+#define VKI_O_LARGEFILE       0200000
 
 #define VKI_AT_FDCWD            -100
 
index 2fcc2c54c84afda314da08225ef44eb2dd98ac7a..c5576261012c4732ce5387dc299c027f2e7d420c 100644 (file)
@@ -377,7 +377,7 @@ struct vki_sigcontext {
 #define VKI_O_TRUNC           01000 /* not fcntl */
 #define VKI_O_APPEND          02000
 #define VKI_O_NONBLOCK        04000
-#define VKI_O_DIRECT         040000
+#define VKI_O_DIRECT        0400000
 #define VKI_O_LARGEFILE     0200000
 
 #define VKI_AT_FDCWD            -100