diff options
Diffstat (limited to '')
-rw-r--r-- | cpukit/libcsupport/src/telldir.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/cpukit/libcsupport/src/telldir.c b/cpukit/libcsupport/src/telldir.c index eee8d925ec..cea6cc08cb 100644 --- a/cpukit/libcsupport/src/telldir.c +++ b/cpukit/libcsupport/src/telldir.c @@ -1,7 +1,14 @@ /* * telldir() - 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/param.h> @@ -9,15 +16,24 @@ #include <dirent.h> #include <stdlib.h> #include <unistd.h> -#include <errno.h> -#include <rtems.h> -#include "libio.h" +#include "libio_.h" + long telldir( DIR *dirp ) { - errno = ENOSYS; - return -1; + rtems_libio_t *iop; + + /* + * Get the file control block structure associated with the file descriptor + */ + + iop = rtems_libio_iop( dirp->dd_fd ); + + if (iop == NULL) + assert(0); + + return (long)( iop->offset ); } |