Pass along errno from failed ftruncate().

This commit is contained in:
Eric Norum
2005-07-13 02:19:30 +00:00
parent fb875a8585
commit 51c1867659
2 changed files with 5 additions and 0 deletions

View File

@@ -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.

View File

@@ -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;