source: rtems/cpukit/libfs/src/defaults/default_lseek_directory.c @ 255fe43

Last change on this file since 255fe43 was 255fe43, checked in by Joel Sherrill <joel@…>, on 03/01/22 at 20:40:44

cpukit/: Scripted embedded brains header file clean up

Updates #4625.

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