diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-10-13 16:07:38 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-10-13 16:07:38 +0000 |
commit | 928395ea568e2d4814ef017fca68ae5dc772a458 (patch) | |
tree | 96e2a7f516b92a854d4590e817653f4dfeac743f /c/src/exec/libcsupport/src/telldir.c | |
parent | Added missing BSPs. (diff) | |
download | rtems-928395ea568e2d4814ef017fca68ae5dc772a458.tar.bz2 |
New files.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/libcsupport/src/telldir.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/c/src/exec/libcsupport/src/telldir.c b/c/src/exec/libcsupport/src/telldir.c new file mode 100644 index 0000000000..9825f04939 --- /dev/null +++ b/c/src/exec/libcsupport/src/telldir.c @@ -0,0 +1,40 @@ +/* + * telldir() - 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 <stdlib.h> +#include <unistd.h> + +#include "libio_.h" + + +long telldir( + DIR *dirp +) +{ + 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 ); +} |