diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-12-10 23:31:54 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-12-10 23:31:54 +0000 |
commit | cca44008d81209e9fa992157637d9de0384e0536 (patch) | |
tree | e13728c80e91a8cff28f98ca7d7e6dea2359e05f /c/src/exec/libcsupport/src/fsync.c | |
parent | RDBG headers files ignored if not configured (diff) | |
download | rtems-cca44008d81209e9fa992157637d9de0384e0536.tar.bz2 |
Merged Eric Norum's select patch that was based on 4.0 and resolved
all conflicts.
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/libcsupport/src/fsync.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/c/src/exec/libcsupport/src/fsync.c b/c/src/exec/libcsupport/src/fsync.c index a5ed1e99e7..b77c77312c 100644 --- a/c/src/exec/libcsupport/src/fsync.c +++ b/c/src/exec/libcsupport/src/fsync.c @@ -22,22 +22,22 @@ int fsync( { rtems_libio_t *iop; + rtems_libio_check_fd( fd ); + iop = rtems_libio_iop( fd ); + rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); + /* * If this file descriptor is mapped to an external set of handlers, * then pass the request on to them. */ - if ( rtems_file_descriptor_type( fd ) ) + if ( iop->flags & LIBIO_FLAGS_HANDLER_MASK ) set_errno_and_return_minus_one( EBADF ); /* * Now process the fsync(). */ - iop = rtems_libio_iop( fd ); - rtems_libio_check_fd( fd ); - rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); - if ( !iop->handlers->fsync ) set_errno_and_return_minus_one( ENOTSUP ); |