4.115
Rev | Line | |
---|
[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] | 28 | off_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.