From 928395ea568e2d4814ef017fca68ae5dc772a458 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 13 Oct 1998 16:07:38 +0000 Subject: New files. --- cpukit/libcsupport/src/seekdir.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 cpukit/libcsupport/src/seekdir.c (limited to 'cpukit/libcsupport/src/seekdir.c') 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 +#include +#include +#include +#include +#include + +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; + +} -- cgit v1.2.3