Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(313)

Unified Diff: sysdeps/nacl/sysdep.h

Issue 9965011: added several syscalls for nacl mounts (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: fixed getcwd Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sysdeps/nacl/irt_syscalls.c ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sysdeps/nacl/sysdep.h
diff --git a/sysdeps/nacl/sysdep.h b/sysdeps/nacl/sysdep.h
index 0f43b4dc5a0974f70b64446de5bc766d9b3fe843..47679b95031d6042ec72aab41dfb49ff7b444aa0 100644
--- a/sysdeps/nacl/sysdep.h
+++ b/sysdeps/nacl/sysdep.h
@@ -114,8 +114,8 @@ INTERNAL_SYSCALL_capset_2 (int *err, struct __user_cap_header_struct *hdrp,
__extern_always_inline int
INTERNAL_SYSCALL_chdir_1 (int *err, const char *path)
{
- *err = (38 /* ENOSYS */);
- return 0;
+ *err = __nacl_irt_chdir (path);
+ return *err != 0 ? -1 : 0;
}
__extern_always_inline int
@@ -588,8 +588,13 @@ INTERNAL_SYSCALL_getcpu_3 (int *err, unsigned *cpu, unsigned *node,
__extern_always_inline int
INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size)
{
- *err = (38 /* ENOSYS */);
- return 0;
+ int ret;
+ if (buf == 0) {
pasko-google - do not use 2012/03/30 13:24:58 GNU style code (ugly, huh?): if (buf == 0) {
+ *err = EINVAL;
+ return 0;
+ }
+ *err = __nacl_irt_getcwd (buf, size, &ret);
+ return ret;
}
__extern_always_inline gid_t
@@ -915,8 +920,8 @@ INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length,
__extern_always_inline int
INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode)
{
- *err = (38 /* ENOSYS */);
- return 0;
+ *err = __nacl_irt_mkdir (pathname, mode);
+ return *err != 0 ? -1 : 0;
}
__extern_always_inline int
@@ -1305,8 +1310,8 @@ INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname,
__extern_always_inline int
INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname)
{
- *err = (38 /* ENOSYS */);
- return 0;
+ *err = __nacl_irt_rmdir (pathname);
+ return *err != 0 ? -1 : 0;
}
__extern_always_inline int
« no previous file with comments | « sysdeps/nacl/irt_syscalls.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698