projects
/
platform
/
upstream
/
kmod.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0de690c
)
testsuite: trap calls to mkdir
author
Lucas De Marchi
<lucas.de.marchi@gmail.com>
Thu, 24 May 2012 04:58:54 +0000
(
01:58
-0300)
committer
Lucas De Marchi
<lucas.de.marchi@gmail.com>
Tue, 5 Jun 2012 03:54:47 +0000
(
00:54
-0300)
testsuite/path.c
patch
|
blob
|
history
diff --git
a/testsuite/path.c
b/testsuite/path.c
index
60df4a0
..
204c79f
100644
(file)
--- a/
testsuite/path.c
+++ b/
testsuite/path.c
@@
-139,6
+139,23
@@
TS_EXPORT int open(const char *path, int flags, ...)
return _open(p, flags);
}
+TS_EXPORT int mkdir(const char *path, mode_t mode)
+{
+ const char *p;
+ char buf[PATH_MAX * 2];
+ static int (*_mkdir)(const char *path, mode_t mode);
+
+ if (!get_rootpath(__func__))
+ return -1;
+
+ _mkdir = get_libc_func("mkdir");
+ p = trap_path(path, buf);
+ if (p == NULL)
+ return -1;
+
+ return _mkdir(p, mode);
+}
+
TS_EXPORT int stat(const char *path, struct stat *st)
{
const char *p;