summaryrefslogtreecommitdiffstats
path: root/trunk/src/wrap-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'trunk/src/wrap-file.c')
-rw-r--r--trunk/src/wrap-file.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/trunk/src/wrap-file.c b/trunk/src/wrap-file.c
index c631458..0f7120c 100644
--- a/trunk/src/wrap-file.c
+++ b/trunk/src/wrap-file.c
@@ -534,3 +534,20 @@ wrap_unlink (const char *filename)
free (tmpname);
return ret;
}
+
+int
+wrap_readlink (const char *path, char *buf, int len)
+{
+ char *tmpname = sysroot_file_name (path, 1, NULL);
+ int ret;
+
+ if (tmpname == NULL)
+ return -1;
+
+ ret = readlink (tmpname, buf, len);
+
+ if (tmpname != path)
+ free (tmpname);
+ return ret;
+}
+