[Pkg-shadow-commits] r3509 - debian/trunk/tests/common
Nicolas FRANÇOIS
nekral-guest at alioth.debian.org
Sun Oct 16 14:24:12 UTC 2011
Author: nekral-guest
Date: 2011-10-16 14:24:11 +0000 (Sun, 16 Oct 2011)
New Revision: 3509
Modified:
debian/trunk/tests/common/open_RDWR_failure.c
Log:
Test that only O_RDWR is set.
Rename internal symbols to *open64.
Modified: debian/trunk/tests/common/open_RDWR_failure.c
===================================================================
--- debian/trunk/tests/common/open_RDWR_failure.c 2011-10-15 16:01:07 UTC (rev 3508)
+++ debian/trunk/tests/common/open_RDWR_failure.c 2011-10-16 14:24:11 UTC (rev 3509)
@@ -18,16 +18,16 @@
typedef int (*open_type) (const char *pathname, int flag, ...);
-static open_type next_open;
+static open_type next_open64;
static const char *failure_path = NULL;
int open64 (const char *pathname, int flag, ...)
{
- if (NULL == next_open)
+ if (NULL == next_open64)
{
- next_open = dlsym (RTLD_NEXT, "open64");
- assert (NULL != next_open);
+ next_open64 = dlsym (RTLD_NEXT, "open64");
+ assert (NULL != next_open64);
}
if (NULL == failure_path) {
failure_path = getenv ("FAILURE_PATH");
@@ -37,7 +37,7 @@
}
if ( (NULL != pathname)
- && (flag & O_RDWR)
+ && ((flag & O_ACCMODE) == O_RDWR)
&& (NULL != failure_path)
&& (strcmp (pathname, failure_path) == 0))
{
@@ -46,6 +46,6 @@
return -1;
}
- return next_open (pathname, flag);
+ return next_open64 (pathname, flag);
}
More information about the Pkg-shadow-commits
mailing list