summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/rewinddir.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/rewinddir.c')
-rw-r--r--cpukit/libcsupport/src/rewinddir.c21
1 files changed, 18 insertions, 3 deletions
diff --git a/cpukit/libcsupport/src/rewinddir.c b/cpukit/libcsupport/src/rewinddir.c
index c85e6fd4d0..04313a6042 100644
--- a/cpukit/libcsupport/src/rewinddir.c
+++ b/cpukit/libcsupport/src/rewinddir.c
@@ -1,7 +1,14 @@
/*
* rewinddir() - POSIX 1003.1b - XXX
*
- * $Id$
+ * COPYRIGHT (c) 1989-1998.
+ * On-Line Applications Research Corporation (OAR).
+ * Copyright assigned to U.S. Government, 1994.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.OARcorp.com/rtems/license.html.
+ *
*/
#include <sys/types.h>
@@ -15,6 +22,14 @@ void rewinddir(
DIR *dirp
)
{
- errno = ENOSYS;
- return -1;
+ off_t status;
+
+ status = lseek( dirp->dd_fd, 0, SEEK_SET );
+
+ if( status == -1 )
+ return;
+
+ dirp->dd_loc = 0;
+
+
}