Needed by depmod.
Signed-off-by: Keegan McAllister <[email protected]>
---
testing.h | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/testing.h b/testing.h
index 1fe234a..9d6090a 100644
--- a/testing.h
+++ b/testing.h
@@ -41,6 +41,8 @@ __attribute__((unused));
static int modtest_readlink(const char *path, char *buf, size_t bufsiz)
__attribute__((unused));
+static int modtest_unlink(const char *path)
+__attribute__((unused));
static int modtest_uname(struct utsname *buf)
{
@@ -215,6 +217,14 @@ static int modtest_readlink(const char *path, char *buf,
size_t bufsiz)
return readlink(path, buf, bufsiz);
}
+static int modtest_unlink(const char *path)
+{
+ char path_buf[PATH_MAX];
+
+ path = modtest_mapname(path, path_buf, sizeof(path_buf));
+ return unlink(path);
+}
+
#ifdef CONFIG_USE_ZLIB
#include <zlib.h>
static gzFile *modtest_gzopen(const char *path, const char *mode)
@@ -244,6 +254,7 @@ static gzFile *modtest_gzopen(const char *path, const char
*mode)
#define system modtest_system
#define rename modtest_rename
#define readlink modtest_readlink
+#define unlink modtest_unlink
#define gzopen modtest_gzopen
#endif /* JUST_TESTING */
--
1.7.2.3
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html