Changeset 3daf2c31 in mainline
- Timestamp:
- 2011-06-29T23:21:07Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9067152
- Parents:
- 87ba48cb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/sys/stat.c
r87ba48cb r3daf2c31 41 41 42 42 /** 43 * Convert HelenOS stat struct into POSIX stat struct (if possible) 43 * Convert HelenOS stat struct into POSIX stat struct (if possible). 44 44 * 45 * @param dest 46 * @param src 45 * @param dest POSIX stat struct. 46 * @param src HelenOS stat struct. 47 47 */ 48 48 static void stat_to_posix(struct posix_stat *dest, struct stat *src) … … 66 66 67 67 /** 68 * Retrieve file status for file associated with file descriptor. 68 69 * 69 * @param fd 70 * @param st 71 * @return 70 * @param fd File descriptor of the opened file. 71 * @param st Status structure to be filled with information. 72 * @return Zero on success, -1 otherwise. 72 73 */ 73 74 int posix_fstat(int fd, struct posix_stat *st) … … 83 84 84 85 /** 86 * Retrieve file status for symbolic link. 85 87 * 86 * @param path 87 * @param st 88 * @return 88 * @param path Path to the symbolic link. 89 * @param st Status structure to be filled with information. 90 * @return Zero on success, -1 otherwise. 89 91 */ 90 int posix_lstat(const char * restrict path, struct posix_stat *restrictst)92 int posix_lstat(const char *path, struct posix_stat *st) 91 93 { 92 / / TODO93 not_implemented();94 /* There are currently no symbolic links in HelenOS. */ 95 return posix_stat(path, st); 94 96 } 95 97 96 98 /** 99 * Retrieve file status for regular file (or symbolic link target). 97 100 * 98 * @param path 99 * @param st 100 * @return 101 * @param path Path to the file/link. 102 * @param st Status structure to be filled with information. 103 * @return Zero on success, -1 otherwise. 101 104 */ 102 105 int posix_stat(const char *path, struct posix_stat *st) … … 112 115 113 116 /** 117 * Change permission bits for the file if possible. 114 118 * 115 * @param path 116 * @param mode 117 * @return 119 * @param path Path to the file. 120 * @param mode Permission bits to be set. 121 * @return Zero on success, -1 otherwise. 118 122 */ 119 123 int posix_chmod(const char *path, mode_t mode) 120 124 { 121 / / TODO122 not_implemented();125 /* HelenOS doesn't support permissions, return success. */ 126 return 0; 123 127 } 124 128 125 129 /** 130 * Set the file mode creation mask of the process. 126 131 * 127 * @param mask 128 * @return 132 * @param mask Set permission bits are cleared in the related creation 133 * functions. Non-permission bits are ignored. 134 * @return Previous file mode creation mask. 129 135 */ 130 136 mode_t posix_umask(mode_t mask) 131 137 { 132 / / TODO133 not_implemented();138 /* HelenOS doesn't support permissions, return empty mask. */ 139 return 0; 134 140 } 135 141
Note:
See TracChangeset
for help on using the changeset viewer.