|
From: <sv...@va...> - 2007-01-31 23:06:12
|
Author: dirk
Date: 2007-01-31 23:06:08 +0000 (Wed, 31 Jan 2007)
New Revision: 6566
Log:
implement support for AT_FDCWD in openat()
Modified:
trunk/coregrind/m_syswrap/syswrap-linux.c
trunk/include/vki/vki-amd64-linux.h
trunk/include/vki/vki-ppc32-linux.h
trunk/include/vki/vki-ppc64-linux.h
trunk/include/vki/vki-x86-linux.h
Modified: trunk/coregrind/m_syswrap/syswrap-linux.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/coregrind/m_syswrap/syswrap-linux.c 2007-01-30 23:16:32 UTC (re=
v 6565)
+++ trunk/coregrind/m_syswrap/syswrap-linux.c 2007-01-31 23:06:08 UTC (re=
v 6566)
@@ -2435,7 +2435,7 @@
int, dfd, const char *, filename, int, flags);
}
=20
- if (!ML_(fd_allowed)(ARG1, "openat", tid, False))
+ if (ARG1 !=3D VKI_AT_FDCWD && !ML_(fd_allowed)(ARG1, "openat", tid, F=
alse))
SET_STATUS_Failure( VKI_EBADF );
else
PRE_MEM_RASCIIZ( "openat(filename)", ARG2 );
Modified: trunk/include/vki/vki-amd64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-amd64-linux.h 2007-01-30 23:16:32 UTC (rev 6565=
)
+++ trunk/include/vki/vki-amd64-linux.h 2007-01-31 23:06:08 UTC (rev 6566=
)
@@ -240,6 +240,8 @@
#define VKI_O_NONBLOCK 04000
#define VKI_O_LARGEFILE 0100000
=20
+#define VKI_AT_FDCWD -100
+
#define VKI_F_DUPFD 0 /* dup */
#define VKI_F_GETFD 1 /* get close_on_exec */
#define VKI_F_SETFD 2 /* set/clear close_on_exec */
Modified: trunk/include/vki/vki-ppc32-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-ppc32-linux.h 2007-01-30 23:16:32 UTC (rev 6565=
)
+++ trunk/include/vki/vki-ppc32-linux.h 2007-01-31 23:06:08 UTC (rev 6566=
)
@@ -301,6 +301,8 @@
#define VKI_O_NONBLOCK 04000
#define VKI_O_LARGEFILE 0200000
=20
+#define VKI_AT_FDCWD -100
+
#define VKI_F_DUPFD 0 /* dup */
#define VKI_F_GETFD 1 /* get close_on_exec */
#define VKI_F_SETFD 2 /* set/clear close_on_exec */
Modified: trunk/include/vki/vki-ppc64-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-ppc64-linux.h 2007-01-30 23:16:32 UTC (rev 6565=
)
+++ trunk/include/vki/vki-ppc64-linux.h 2007-01-31 23:06:08 UTC (rev 6566=
)
@@ -358,6 +358,8 @@
#define VKI_O_NONBLOCK 04000
#define VKI_O_LARGEFILE 0200000
=20
+#define VKI_AT_FDCWD -100
+
#define VKI_F_DUPFD 0 /* dup */
#define VKI_F_GETFD 1 /* get close_on_exec */
#define VKI_F_SETFD 2 /* set/clear close_on_exec */
Modified: trunk/include/vki/vki-x86-linux.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/include/vki/vki-x86-linux.h 2007-01-30 23:16:32 UTC (rev 6565)
+++ trunk/include/vki/vki-x86-linux.h 2007-01-31 23:06:08 UTC (rev 6566)
@@ -272,6 +272,8 @@
#define VKI_O_NONBLOCK 04000
#define VKI_O_LARGEFILE 0100000
=20
+#define VKI_AT_FDCWD -100
+
#define VKI_F_DUPFD 0 /* dup */
#define VKI_F_GETFD 1 /* get close_on_exec */
#define VKI_F_SETFD 2 /* set/clear close_on_exec */
|