Changeset 7f9df7b9 in mainline for uspace/lib/posix/src/sys
- Timestamp:
- 2018-01-22T22:42:57Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7a08c70
- Parents:
- e0f47f5
- Location:
- uspace/lib/posix/src/sys
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/sys/mman.c
re0f47f5 r7f9df7b9 33 33 */ 34 34 35 #define LIBPOSIX_INTERNAL36 #define __POSIX_DEF__(x) posix_##x37 38 35 #include "../internal/common.h" 39 36 #include <posix/sys/mman.h> … … 42 39 #include <posix/unistd.h> 43 40 44 void * posix_mmap(void *start, size_t length, int prot, int flags, int fd,45 __POSIX_DEF__(off_t)offset)41 void *mmap(void *start, size_t length, int prot, int flags, int fd, 42 off_t offset) 46 43 { 47 44 if (!start) … … 57 54 } 58 55 59 int posix_munmap(void *start, size_t length)56 int munmap(void *start, size_t length) 60 57 { 61 58 int rc = as_area_destroy(start); -
uspace/lib/posix/src/sys/stat.c
re0f47f5 r7f9df7b9 34 34 */ 35 35 36 #define LIBPOSIX_INTERNAL37 #define __POSIX_DEF__(x) posix_##x38 39 36 #include "../internal/common.h" 40 37 #include "posix/sys/stat.h" … … 52 49 * @return 0 on success, -1 on error. 53 50 */ 54 static int stat_to_posix(struct posix_stat *dest, vfs_stat_t *src)51 static int stat_to_posix(struct stat *dest, vfs_stat_t *src) 55 52 { 56 memset(dest, 0, sizeof(struct posix_stat));53 memset(dest, 0, sizeof(struct stat)); 57 54 58 55 dest->st_dev = src->service; … … 86 83 * @return Zero on success, -1 otherwise. 87 84 */ 88 int posix_fstat(int fd, struct posix_stat *st)85 int fstat(int fd, struct stat *st) 89 86 { 90 87 vfs_stat_t hst; … … 101 98 * @return Zero on success, -1 otherwise. 102 99 */ 103 int posix_lstat(const char *restrict path, struct posix_stat *restrict st)100 int lstat(const char *restrict path, struct stat *restrict st) 104 101 { 105 102 /* There are currently no symbolic links in HelenOS. */ 106 return posix_stat(path, st);103 return stat(path, st); 107 104 } 108 105 … … 114 111 * @return Zero on success, -1 otherwise. 115 112 */ 116 int posix_stat(const char *restrict path, struct posix_stat *restrict st)113 int stat(const char *restrict path, struct stat *restrict st) 117 114 { 118 115 vfs_stat_t hst; … … 129 126 * @return Zero on success, -1 otherwise. 130 127 */ 131 int posix_chmod(const char *path, posix_mode_t mode)128 int chmod(const char *path, mode_t mode) 132 129 { 133 130 /* HelenOS doesn't support permissions, return success. */ … … 142 139 * @return Previous file mode creation mask. 143 140 */ 144 posix_mode_t posix_umask(posix_mode_t mask)141 mode_t umask(mode_t mask) 145 142 { 146 143 /* HelenOS doesn't support permissions, return empty mask. */ … … 155 152 * @return Zero on success, -1 otherwise. 156 153 */ 157 int posix_mkdir(const char *path, posix_mode_t mode)154 int mkdir(const char *path, mode_t mode) 158 155 { 159 156 if (failed(vfs_link_path(path, KIND_DIRECTORY, NULL))) -
uspace/lib/posix/src/sys/wait.c
re0f47f5 r7f9df7b9 33 33 /** @file Support for waiting. 34 34 */ 35 36 #define LIBPOSIX_INTERNAL37 #define __POSIX_DEF__(x) posix_##x38 35 39 36 #include "../internal/common.h" … … 76 73 * -1 on signal interrupt, (pid_t)-1 otherwise. 77 74 */ 78 p osix_pid_t posix_wait(int *stat_ptr)75 pid_t wait(int *stat_ptr) 79 76 { 80 77 /* HelenOS does not support this. */ 81 78 errno = ENOSYS; 82 return (p osix_pid_t) -1;79 return (pid_t) -1; 83 80 } 84 81 … … 94 91 * no child process whose status can be reported, (pid_t)-1 otherwise. 95 92 */ 96 p osix_pid_t posix_waitpid(posix_pid_t pid, int *stat_ptr, int options)93 pid_t waitpid(pid_t pid, int *stat_ptr, int options) 97 94 { 98 95 assert(stat_ptr != NULL); … … 104 101 if (failed(task_wait_task_id((task_id_t) pid, &texit, &retval))) { 105 102 /* Unable to retrieve status. */ 106 return (p osix_pid_t) -1;103 return (pid_t) -1; 107 104 } 108 105
Note:
See TracChangeset
for help on using the changeset viewer.