Changeset 7f9df7b9 in mainline for uspace/lib/posix/src/sys/stat.c
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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)))
Note:
See TracChangeset
for help on using the changeset viewer.