Changeset 2b3dd78 in mainline for uspace/lib/posix/src/sys/stat.c
- Timestamp:
- 2018-01-31T12:02:00Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5595841
- Parents:
- a0a9cc2 (diff), 14d789c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 moved
-
uspace/lib/posix/src/sys/stat.c (moved) (moved from uspace/lib/posix/source/sys/stat.c ) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/src/sys/stat.c
ra0a9cc2 r2b3dd78 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, struct stat *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 struct stat hst;87 vfs_stat_t hst; 91 88 if (failed(vfs_stat(fd, &hst))) 92 89 return -1; … … 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 struct stat hst;115 vfs_stat_t hst; 119 116 if (failed(vfs_stat_path(path, &hst))) 120 117 return -1; … … 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.
