forked from Imagelibrary/rtems
Pass along errno from failed ftruncate().
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user