| Index: native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
|
| index 2f49395ee019fe05a24c46053c7d6b2dfac6fdd2..ddaf56f8da4de6a02a3bbd8ce4d1b2019c271ce4 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/kernel_proxy.cc
|
| @@ -558,10 +558,25 @@ int KernelProxy::fchmod(int fd, int mode) {
|
| }
|
|
|
| int KernelProxy::access(const char* path, int amode) {
|
| - errno = EINVAL;
|
| - return -1;
|
| + Path rel;
|
| +
|
| + Mount* mnt;
|
| + Error error = AcquireMountAndPath(path, &mnt, &rel);
|
| + if (error) {
|
| + errno = error;
|
| + return -1;
|
| + }
|
| +
|
| + error = mnt->Access(rel, amode);
|
| + ReleaseMount(mnt);
|
| + if (error) {
|
| + errno = error;
|
| + return -1;
|
| + }
|
| + return 0;
|
| }
|
|
|
| +// TODO(noelallen): Needs implementation.
|
| int KernelProxy::link(const char* oldpath, const char* newpath) {
|
| errno = EINVAL;
|
| return -1;
|
|
|