diff options
author | Eric Norum <WENorum@lbl.gov> | 2005-07-13 02:19:30 +0000 |
---|---|---|
committer | Eric Norum <WENorum@lbl.gov> | 2005-07-13 02:19:30 +0000 |
commit | 51c18676596f6da8745606e6a731be4813e1ec65 (patch) | |
tree | 029de29ac9c4339f60a536e31dc58ad0e5ac19af /cpukit/libcsupport | |
parent | 2005-07-08 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-51c18676596f6da8745606e6a731be4813e1ec65.tar.bz2 |
Pass along errno from failed ftruncate().
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/src/open.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c index 66c5367f76..a67680a031 100644 --- a/cpukit/libcsupport/src/open.c +++ b/cpukit/libcsupport/src/open.c @@ -174,6 +174,7 @@ int open( if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { + if(errno) rc = errno; close( iop - rtems_libio_iops ); /* those are released by close(): */ iop = 0; |