5
Last change
on this file since 9012db8 was
9012db8,
checked in by Sebastian Huber <sebastian.huber@…>, on 09/13/17 at 09:33:25
|
libio: LIBIO_GET_IOP() LIBIO_GET_IOP_WITH_ACCESS()
Replace rtems_libio_check_fd(), rtems_libio_iop(),
rtems_libio_check_open() and rtems_libio_check_permissions()
combinations with new LIBIO_GET_IOP() and LIBIO_GET_IOP_WITH_ACCESS()
macros.
Update #3132.
|
-
Property mode set to
100644
|
File size:
705 bytes
|
Line | |
---|
1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief Synchronize the State of a File |
---|
5 | * @ingroup libcsupport |
---|
6 | */ |
---|
7 | |
---|
8 | /* |
---|
9 | * COPYRIGHT (c) 1989-2011. |
---|
10 | * On-Line Applications Research Corporation (OAR). |
---|
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 | #if HAVE_CONFIG_H |
---|
18 | #include "config.h" |
---|
19 | #endif |
---|
20 | |
---|
21 | #include <unistd.h> |
---|
22 | |
---|
23 | #include <rtems/libio_.h> |
---|
24 | #include <rtems/seterr.h> |
---|
25 | |
---|
26 | /** |
---|
27 | * POSIX 1003.1b 6.6.1 - Synchronize the State of a File |
---|
28 | */ |
---|
29 | int fsync( |
---|
30 | int fd |
---|
31 | ) |
---|
32 | { |
---|
33 | rtems_libio_t *iop; |
---|
34 | |
---|
35 | LIBIO_GET_IOP( fd, iop ); |
---|
36 | |
---|
37 | /* |
---|
38 | * Now process the fsync(). |
---|
39 | */ |
---|
40 | |
---|
41 | return (*iop->pathinfo.handlers->fsync_h)( iop ); |
---|
42 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.