4.115
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief RTEMS Default File System reposits read/write file offset directory |
---|
5 | * @ingroup LibIOFSOps File System Operations |
---|
6 | */ |
---|
7 | |
---|
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 | |
---|
28 | off_t rtems_filesystem_default_lseek_directory( |
---|
29 | rtems_libio_t *iop, |
---|
30 | off_t offset, |
---|
31 | int whence |
---|
32 | ) |
---|
33 | { |
---|
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; |
---|
44 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.