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

Side by Side 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: remove buf check Created 8 years, 8 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 unified diff | Download patch
« no previous file with comments | « sysdeps/nacl/irt_syscalls.c ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #ifndef _NACL_SYSDEP_H 1 #ifndef _NACL_SYSDEP_H
2 #define _NACL_SYSDEP_H 1 2 #define _NACL_SYSDEP_H 1
3 3
4 #if !defined(__ASSEMBLER__) 4 #if !defined(__ASSEMBLER__)
5 #include <futex_emulation.h> 5 #include <futex_emulation.h>
6 #include <irt_syscalls.h> 6 #include <irt_syscalls.h>
7 #include <lowlevellock.h> 7 #include <lowlevellock.h>
8 8
9 /* Implementation of all syscalls for use in platform- and OS- independent code 9 /* Implementation of all syscalls for use in platform- and OS- independent code
10 as inline functions. Each function translates the syscall arguments into IRT 10 as inline functions. Each function translates the syscall arguments into IRT
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 INTERNAL_SYSCALL_capset_2 (int *err, struct __user_cap_header_struct *hdrp, 107 INTERNAL_SYSCALL_capset_2 (int *err, struct __user_cap_header_struct *hdrp,
108 const struct __user_cap_data_struct *datap) 108 const struct __user_cap_data_struct *datap)
109 { 109 {
110 *err = (38 /* ENOSYS */); 110 *err = (38 /* ENOSYS */);
111 return 0; 111 return 0;
112 } 112 }
113 113
114 __extern_always_inline int 114 __extern_always_inline int
115 INTERNAL_SYSCALL_chdir_1 (int *err, const char *path) 115 INTERNAL_SYSCALL_chdir_1 (int *err, const char *path)
116 { 116 {
117 *err = (38 /* ENOSYS */); 117 *err = __nacl_irt_chdir (path);
118 return 0; 118 return 0;
119 } 119 }
120 120
121 __extern_always_inline int 121 __extern_always_inline int
122 INTERNAL_SYSCALL_chmod_2 (int *err, const char *path, mode_t mode) 122 INTERNAL_SYSCALL_chmod_2 (int *err, const char *path, mode_t mode)
123 { 123 {
124 *err = (38 /* ENOSYS */); 124 *err = (38 /* ENOSYS */);
125 return 0; 125 return 0;
126 } 126 }
127 127
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 return 0; 581 return 0;
582 } 582 }
583 583
584 /* NOTE! The user-level library version returns a character pointer. 584 /* NOTE! The user-level library version returns a character pointer.
585 585
586 The system call just returns the length of the buffer filled (which includes 586 The system call just returns the length of the buffer filled (which includes
587 the ending '\0' character), or zero in case of error. */ 587 the ending '\0' character), or zero in case of error. */
588 __extern_always_inline int 588 __extern_always_inline int
589 INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size) 589 INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size)
590 { 590 {
591 *err = (38 /* ENOSYS */); 591 int ret;
592 return 0; 592 *err = __nacl_irt_getcwd (buf, size, &ret);
593 return ret;
593 } 594 }
594 595
595 __extern_always_inline gid_t 596 __extern_always_inline gid_t
596 INTERNAL_SYSCALL_getegid_0 (int *err) 597 INTERNAL_SYSCALL_getegid_0 (int *err)
597 { 598 {
598 *err = (38 /* ENOSYS */); 599 *err = (38 /* ENOSYS */);
599 return 0; 600 return 0;
600 } 601 }
601 602
602 __extern_always_inline uid_t 603 __extern_always_inline uid_t
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length, 909 INTERNAL_SYSCALL_mincore_3 (int *err, void *addr, size_t length,
909 unsigned char *vec) 910 unsigned char *vec)
910 { 911 {
911 *err = (38 /* ENOSYS */); 912 *err = (38 /* ENOSYS */);
912 return 0; 913 return 0;
913 } 914 }
914 915
915 __extern_always_inline int 916 __extern_always_inline int
916 INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode) 917 INTERNAL_SYSCALL_mkdir_2 (int *err, const char *pathname, mode_t mode)
917 { 918 {
918 *err = (38 /* ENOSYS */); 919 *err = __nacl_irt_mkdir (pathname, mode);
919 return 0; 920 return 0;
920 } 921 }
921 922
922 __extern_always_inline int 923 __extern_always_inline int
923 INTERNAL_SYSCALL_mkdirat_3 (int *err, int dirfd, const char *pathname, 924 INTERNAL_SYSCALL_mkdirat_3 (int *err, int dirfd, const char *pathname,
924 mode_t mode) 925 mode_t mode)
925 { 926 {
926 *err = (38 /* ENOSYS */); 927 *err = (38 /* ENOSYS */);
927 return 0; 928 return 0;
928 } 929 }
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1298 INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname, 1299 INTERNAL_SYSCALL_renameat_4 (int *err, int olddfd, const char *oldname,
1299 int newdfd, const char *newname) 1300 int newdfd, const char *newname)
1300 { 1301 {
1301 *err = (38 /* ENOSYS */); 1302 *err = (38 /* ENOSYS */);
1302 return 0; 1303 return 0;
1303 } 1304 }
1304 1305
1305 __extern_always_inline int 1306 __extern_always_inline int
1306 INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname) 1307 INTERNAL_SYSCALL_rmdir_1 (int *err, const char *pathname)
1307 { 1308 {
1308 *err = (38 /* ENOSYS */); 1309 *err = __nacl_irt_rmdir (pathname);
1309 return 0; 1310 return 0;
1310 } 1311 }
1311 1312
1312 __extern_always_inline int 1313 __extern_always_inline int
1313 INTERNAL_SYSCALL_rt_sigpending_2 (int *err, sigset_t *set, size_t sigsetsize) 1314 INTERNAL_SYSCALL_rt_sigpending_2 (int *err, sigset_t *set, size_t sigsetsize)
1314 { 1315 {
1315 *err = (38 /* ENOSYS */); 1316 *err = (38 /* ENOSYS */);
1316 return 0; 1317 return 0;
1317 } 1318 }
1318 1319
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 #define PSEUDO_END_ERRVAL(name) \ 2106 #define PSEUDO_END_ERRVAL(name) \
2106 END (name) 2107 END (name)
2107 2108
2108 #undef SYSCALL_ERROR_HANDLER_TLS_STORE 2109 #undef SYSCALL_ERROR_HANDLER_TLS_STORE
2109 #define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \ 2110 #define SYSCALL_ERROR_HANDLER_TLS_STORE(src, destoff) \
2110 movl %gs:0, %eax; \ 2111 movl %gs:0, %eax; \
2111 movl src, (%eax,destoff) 2112 movl src, (%eax,destoff)
2112 2113
2113 #endif 2114 #endif
2114 #endif 2115 #endif
OLDNEW
« 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