aboutsummaryrefslogtreecommitdiffstats
path: root/guts/rmdir.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/rmdir.c')
-rw-r--r--guts/rmdir.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/guts/rmdir.c b/guts/rmdir.c
new file mode 100644
index 0000000..029e5a2
--- /dev/null
+++ b/guts/rmdir.c
@@ -0,0 +1,22 @@
+/*
+ * static int
+ * wrap_rmdir(const char *path) {
+ * int rc = -1;
+ */
+ struct stat64 buf;
+ int save_errno;
+
+ rc = real___lxstat64(_STAT_VER, path, &buf);
+ if (rc == -1) {
+ return rc;
+ }
+ rc = real_rmdir(path);
+ save_errno = errno;
+ if (rc != -1) {
+ pseudo_client_op(OP_UNLINK, AT_SYMLINK_NOFOLLOW, -1, -1, path, &buf);
+ }
+
+ errno = save_errno;
+/* return rc;
+ * }
+ */