source: rtems/cpukit/libfs/src/defaults/default_lseek_directory.c @ 8587b01

4.115
Last change on this file since 8587b01 was 8587b01, checked in by Ayush Awasthi <kolaveridi87@…>, on 12/28/12 at 14:26:30

libfs: Doxygen Enhancement Task #4

  • Property mode set to 100644
File size: 817 bytes
RevLine 
[8587b01]1/**
2 * @file
3 *
4 * @brief RTEMS Default File System reposits read/write file offset directory
5 * @ingroup LibIOFSOps File System Operations
6 */
7
[adef4e4]8/*
9 * Copyright (c) 2012 embedded brains GmbH.  All rights reserved.
10 *
11 *  embedded brains GmbH
12 *  Obere Lagerstr. 30
13 *  82178 Puchheim
14 *  Germany
15 *  <rtems@embedded-brains.de>
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.com/license/LICENSE.
20 */
21
22#if HAVE_CONFIG_H
23  #include "config.h"
24#endif
25
26#include <rtems/libio_.h>
27
[30d4124]28off_t rtems_filesystem_default_lseek_directory(
[adef4e4]29  rtems_libio_t *iop,
30  off_t offset,
31  int whence
32)
33{
[30d4124]34  off_t rv = 0;
35
36  if ( offset == 0 && whence == SEEK_SET ) {
37    iop->offset = 0;
38  } else {
39    errno = EINVAL;
40    rv = -1;
41  }
42
43  return rv;
[adef4e4]44}
Note: See TracBrowser for help on using the repository browser.