diff options
Diffstat (limited to 'guts/remove.c')
-rw-r--r-- | guts/remove.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/guts/remove.c b/guts/remove.c new file mode 100644 index 0000000..da6ecc3 --- /dev/null +++ b/guts/remove.c @@ -0,0 +1,19 @@ +/* + * static int + * wrap_remove(const char *path) { + * int rc = -1; + */ + struct stat buf; + if (real___lxstat(_STAT_VER, path, &buf) == -1) { + errno = ENOENT; + return -1; + } + if (S_ISDIR(buf.st_mode)) { + rc = wrap_rmdir(path); + } else { + rc = wrap_unlink(path); + } + +/* return rc; + * } + */ |