Changeset d0dc74ae in mainline for uspace/lib/libc/generic/vfs.c
- Timestamp:
- 2008-01-13T20:35:52Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d85411a
- Parents:
- 0ee4322
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libc/generic/vfs.c
r0ee4322 rd0dc74ae 34 34 35 35 #include <vfs.h> 36 #include <stdlib.h> 36 37 #include <unistd.h> 38 #include <dirent.h> 37 39 #include <fcntl.h> 38 40 #include <ipc/ipc.h> … … 236 238 } 237 239 240 DIR *opendir(const char *dirname) 241 { 242 DIR *dirp = malloc(sizeof(DIR)); 243 if (!dirp) 244 return NULL; 245 dirp->fd = open(dirname, 0); /* TODO: must be a directory */ 246 if (!dirp->fd) { 247 free(dirp); 248 return NULL; 249 } 250 dirp->pos = 0; 251 return dirp; 252 } 253 254 struct dirent *readdir(DIR *dirp) 255 { 256 return NULL; /* TODO */ 257 } 258 259 void rewinddir(DIR *dirp) 260 { 261 dirp->pos = 0; 262 } 263 264 int closedir(DIR *dirp) 265 { 266 (void) close(dirp->fd); 267 free(dirp); 268 return 0; 269 } 270 271 int close(int fildes) 272 { 273 return 0; /* TODO */ 274 } 275 238 276 /** @} 239 277 */
Note:
See TracChangeset
for help on using the changeset viewer.