summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/seekdir.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-10-13 16:07:38 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-10-13 16:07:38 +0000
commit928395ea568e2d4814ef017fca68ae5dc772a458 (patch)
tree96e2a7f516b92a854d4590e817653f4dfeac743f /cpukit/libcsupport/src/seekdir.c
parentAdded missing BSPs. (diff)
downloadrtems-928395ea568e2d4814ef017fca68ae5dc772a458.tar.bz2
New files.
Diffstat (limited to 'cpukit/libcsupport/src/seekdir.c')
-rw-r--r--cpukit/libcsupport/src/seekdir.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/seekdir.c b/cpukit/libcsupport/src/seekdir.c
new file mode 100644
index 0000000000..f887c7e28b
--- /dev/null
+++ b/cpukit/libcsupport/src/seekdir.c
@@ -0,0 +1,36 @@
+/*
+ * seekdir() - POSIX 1003.1b - XXX
+ *
+ * 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.
+ *
+ * $Id$
+ */
+
+#include <sys/param.h>
+#include <assert.h>
+#include <dirent.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <errno.h>
+
+void seekdir(
+ DIR *dirp,
+ long loc
+)
+{
+ off_t status;
+
+ status = lseek( dirp->dd_fd, loc, SEEK_SET );
+
+ if( status == -1 ) {
+ printf("SEEKDIR: errno: %d\n", errno );
+ }
+ dirp->dd_loc = 0;
+
+}