aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/access.c
blob: 20b00c32744d1d1cf75af6196b1dbeb9b6905be9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <u.h>
#define NOPLAN9DEFINES
#include <libc.h>

char *_p9translate(char*);

int
p9access(char *xname, int what)
{
	int ret;
	char *name;

	if((name = _p9translate(xname)) == nil)
		return -1;
	ret = access(name, what);
	if(name != xname)
		free(name);
	return ret;
}