summaryrefslogtreecommitdiffstats
path: root/cpukit/libcsupport/src/fsync.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libcsupport/src/fsync.c')
-rw-r--r--cpukit/libcsupport/src/fsync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c
index 64f05f341a..3dc9835d31 100644
--- a/cpukit/libcsupport/src/fsync.c
+++ b/cpukit/libcsupport/src/fsync.c
@@ -30,6 +30,9 @@ int fsync(
* Now process the fsync().
*/
+ if ( !iop->handlers )
+ set_errno_and_return_minus_one( EBADF );
+
if ( !iop->handlers->fsync )
set_errno_and_return_minus_one( ENOTSUP );