4.104.114.84.95
Line | |
---|
1 | /* |
---|
2 | * rewinddir() - POSIX 1003.1b - XXX |
---|
3 | * |
---|
4 | * COPYRIGHT (c) 1989-1999. |
---|
5 | * On-Line Applications Research Corporation (OAR). |
---|
6 | * |
---|
7 | * The license and distribution terms for this file may be |
---|
8 | * found in the file LICENSE in this distribution or at |
---|
9 | * http://www.OARcorp.com/rtems/license.html. |
---|
10 | * |
---|
11 | */ |
---|
12 | |
---|
13 | #include <sys/types.h> |
---|
14 | #include <assert.h> |
---|
15 | #include <dirent.h> |
---|
16 | #include <stdio.h> |
---|
17 | #include <errno.h> |
---|
18 | #include <unistd.h> |
---|
19 | |
---|
20 | void rewinddir( |
---|
21 | DIR *dirp |
---|
22 | ) |
---|
23 | { |
---|
24 | off_t status; |
---|
25 | |
---|
26 | if ( !dirp ) |
---|
27 | return; |
---|
28 | |
---|
29 | status = lseek( dirp->dd_fd, 0, SEEK_SET ); |
---|
30 | |
---|
31 | if( status == -1 ) |
---|
32 | return; |
---|
33 | |
---|
34 | dirp->dd_loc = 0; |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.