aboutsummaryrefslogtreecommitdiffstats
path: root/guts/remove.c
blob: da6ecc30d9e65939beb86cd7742a491329a4bf79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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;
 * }
 */