OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [lib/] [libc/] [telldir.c] - Blame information for rev 173

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  telldir() - XXX
3
 *
4
 *  COPYRIGHT (c) 1989-1999.
5
 *  On-Line Applications Research Corporation (OAR).
6
 *
7
 *  The license and distribution terms for this file may be
8
 *  found in the file LICENSE in this distribution or at
9
 *  http://www.OARcorp.com/rtems/license.html.
10
 *
11
 */
12
 
13
#include <sys/param.h>
14
#include <assert.h>
15
#include <dirent.h>
16
#include <stdlib.h>
17
#include <unistd.h>
18
#include <errno.h>
19
 
20
#include "libio_.h"
21
 
22
 
23
long telldir(
24
  DIR *dirp
25
)
26
{
27
  rtems_libio_t  *iop;
28
 
29
  if ( !dirp )
30
    set_errno_and_return_minus_one( EBADF );
31
 
32
  /*
33
   *  Get the file control block structure associated with the
34
   *  file descriptor
35
   */
36
 
37
  iop = rtems_libio_iop( dirp->dd_fd );
38
 
39
  if (iop == NULL)
40
     assert(0);
41
 
42
  return (long)( iop->offset );
43
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.