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 | |
parent | 2005-07-08 Joel Sherrill <joel@OARcorp.com> (diff) | |
download | rtems-51c18676596f6da8745606e6a731be4813e1ec65.tar.bz2 |
Pass along errno from failed ftruncate().
Diffstat (limited to '')
-rw-r--r-- | cpukit/ChangeLog | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/open.c | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 87239874c8..02cd0b5d23 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,7 @@ +2005-07-08 Eric Norum <norume@aps.anl.gov> + + * libcsupport/src/open.c: Pass along errno from failed ftruncate(). + 2005-07-06 Ralf Corsepius <ralf.corsepius@rtems.org> * libnetworking/lib/syslog.c: Fix spelling mistake. 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; |