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

Subversion Repositories openrisc_me

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  rewinddir() - POSIX 1003.1b - 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/types.h>
14
#include <assert.h>
15
#include <dirent.h>
16
#include <stdio.h>
17
#include <errno.h>
18
#include <unistd.h>
19
 
20
void rewinddir(
21
  DIR *dirp
22
)
23
{
24
  off_t status;
25
 
26
  if ( !dirp )
27
    return;
28
 
29
  status = lseek( dirp->dd_fd, 0, SEEK_SET );
30
 
31
  if( status == -1 )
32
    return;
33
 
34
  dirp->dd_loc = 0;
35
}

powered by: WebSVN 2.1.0

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