source: rtems/c/src/lib/libc/seekdir.c @ 32163db

4.104.114.84.95
Last change on this file since 32163db was 73441b6f, checked in by Joel Sherrill <joel.sherrill@…>, on 01/04/99 at 16:26:37

Removed blank lines

  • Property mode set to 100644
File size: 720 bytes
Line 
1/*
2 *  seekdir() - POSIX 1003.1b - XXX
3 *
4 *  COPYRIGHT (c) 1989-1998.
5 *  On-Line Applications Research Corporation (OAR).
6 *  Copyright assigned to U.S. Government, 1994.
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 */
13
14#include <sys/param.h>
15#include <assert.h>
16#include <dirent.h>
17#include <stdio.h>
18#include <unistd.h>
19#include <errno.h>
20
21void seekdir(
22   DIR  *dirp,
23   long  loc
24)
25{
26  off_t status;
27
28  status = lseek( dirp->dd_fd, loc, SEEK_SET );
29
30  /*
31   * This is not a nice way to error out, but we have no choice here.
32   */
33  if( status == -1 )
34    return;
35
36  dirp->dd_loc = 0;
37}
Note: See TracBrowser for help on using the repository browser.