Changeset 0ffbed9 in mainline for uspace/lib/posix/sys/stat.c
- Timestamp:
- 2011-06-19T17:49:29Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5974661
- Parents:
- f48b637 (diff), 32fb6944 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/sys/stat.c
rf48b637 r0ffbed9 1 1 /* 2 2 * Copyright (c) 2011 Jiri Zarevucky 3 * Copyright (c) 2011 Petr Koupy 3 4 * All rights reserved. 4 5 * … … 27 28 */ 28 29 30 /** @addtogroup libposix 31 * @{ 32 */ 33 /** @file 34 */ 35 29 36 #define LIBPOSIX_INTERNAL 30 37 31 38 #include "stat.h" 39 #include "../internal/common.h" 32 40 #include <mem.h> 33 41 34 /* Convert HelenOS stat struct into POSIX stat struct (if possible) 42 /** 43 * Convert HelenOS stat struct into POSIX stat struct (if possible) 44 * 45 * @param dest 46 * @param src 35 47 */ 36 static void stat_to_posix 48 static void stat_to_posix(struct posix_stat *dest, struct stat *src) 37 49 { 38 50 memset(dest, 0, sizeof(struct posix_stat)); … … 42 54 /* HelenOS doesn't support permissions, so we set them all */ 43 55 dest->st_mode = S_IRWXU | S_IRWXG | S_IRWXO; 44 if (src->is_file) 56 if (src->is_file) { 45 57 dest->st_mode |= S_IFREG; 46 if (src->is_directory) 58 } 59 if (src->is_directory) { 47 60 dest->st_mode |= S_IFDIR; 61 } 48 62 49 63 dest->st_nlink = src->lnkcnt; … … 51 65 } 52 66 67 /** 68 * 69 * @param fd 70 * @param st 71 * @return 72 */ 53 73 int posix_fstat(int fd, struct posix_stat *st) 54 74 { … … 62 82 } 63 83 84 /** 85 * 86 * @param path 87 * @param st 88 * @return 89 */ 90 int posix_lstat(const char *restrict path, struct posix_stat *restrict st) 91 { 92 // TODO 93 not_implemented(); 94 } 95 96 /** 97 * 98 * @param path 99 * @param st 100 * @return 101 */ 64 102 int posix_stat(const char *path, struct posix_stat *st) 65 103 { … … 73 111 } 74 112 113 /** 114 * 115 * @param path 116 * @param mode 117 * @return 118 */ 119 int posix_chmod(const char *path, mode_t mode) 120 { 121 // TODO 122 not_implemented(); 123 } 124 125 /** 126 * 127 * @param mask 128 * @return 129 */ 130 mode_t posix_umask(mode_t mask) 131 { 132 // TODO 133 not_implemented(); 134 } 135 136 /** @} 137 */
Note:
See TracChangeset
for help on using the changeset viewer.