| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
* libcsupport/src/unixlibc.c, libfs/src/imfs/ioman.c: Change
rtems_io_register_name to take a const char *.
|
|
|
|
|
|
|
| |
PR 819/filesystem
* libcsupport/src/ttyname_r.c: Remove.
* libcsupport/src/ttyname.c: Partial update from FreeBSD.
* libcsupport/Makefile.am: Reflect changes above.
|
|
|
|
|
|
|
|
| |
PR 744/filesystem
* libcsupport/src/unlink.c, libfs/src/dosfs/msdos_eval.c: DOSFS did not
support permissions on directories so the check performed by unlink
would always fail. The unlink code was modified to support a not
supported status being returned.
|
|
|
|
|
|
| |
PR 808/rtems_misc
* libcsupport/src/printk.c: Fix bug where specifying field width
crashed on pc386 BSP.
|
|
|
|
|
|
|
| |
PR 817/rtems
* libcsupport/src/gxx_wrappers.c: Rename
rtems_gxx_recursive_mutex_init_function to
rtems_gxx_recursive_mutex_init.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 746/rtems
Optimize realloc(). The problem is that realloc() can neither grow
nor shrink efficiently the current memory region without support
from underlying heap/region modules. The patch introduces one new
routine for each of heap and region modules, _Heap_Resize_block(),
and rtems_region_resize_segment(), respectively, and uses the
latter to optimize realloc().
The implementation of _Heap_Resize_block() lead to changing of the
heap allocation strategy: now the heap manager, when splits larger
free block into used and new free parts, makes the first part of
the block used, not the last one as it was before. Due to this new
strategy, _Heap_Resize_block() never needs to change the user
pointer.
Caveat: unlike previous heap implementation, first few bytes of
the contents of the memory allocated from the heap are now almost
never all zero. This can trigger bugs in client code that have not
been visible before this patch.
* libcsupport/src/malloc.c (realloc): try to resize segment in
place using new rtems_region_resize_segment() routine before
falling back to the malloc()/free() method.
* score/src/heap.c:
(_Heap_Initialize): change initial heap layout to reflect new
allocation strategy of using of the lower part of a previously
free block when splitting it for the purpose of allocation.
(_Heap_Block_allocate): when split, make the lower part used, and
leave the upper part free. Return type changed from Heap_Block* to
uint32_t.
* score/include/rtems/score/heap.h:
(Heap_Statistics): added 'resizes' field.
(Heap_Resize_status): new enum.
(_Heap_Resize_block): new routine.
(_Heap_Block_allocate): return type changed from Heap_Block* to
uint32_t.
* score/src/heapwalk.c: reflect new heap layout in checks.
* score/src/heapsizeofuserarea.c: more assertions added.
* score/src/heapresizeblock.c: new file.
(_Heap_Resize_block): new routine.
* score/src/heapfree.c: reverse the checks _Heap_Is_block_in() and
_Heap_Is_prev_used() on entry to be in this order.
* score/src/heapallocate.c, score/src/heapallocatealigned.c:
ignore return value of _Heap_Block_allocate().
* score/Makefile.am (HEAP_C_FILES): added src/heapresizeblock.c.
* rtems/include/rtems/rtems/region.h:
(rtems_region_resize_segment): new interface routine.
(_Region_Process_queue): new internal routine called from
rtems_region_resize_segment() and rtems_region_return_segment().
* rtems/src/regionreturnsegment.c: move queue management code into
the new internal routine _Region_Process_queue() and call it.
* rtems/src/regionresizesegment.c: new file.
(rtems_region_resize_segment): new interface routine.
* rtems/src/regionprocessqueue.c: new file.
(_Region_Process_queue): new internal routine containing queue
management code factored out from 'regionreturnsegment.c'.
* rtems/Makefile.am (REGION_C_FILES): Added
src/regionresizesegment.c, and src/regionprocessqueue.c.
* ada/rtems.adb, ada/rtems.ads: Added Region_Resize_Segment.
|
|
|
|
| |
* libcsupport/src/termios.c: Removed warnings.
|
|
|
|
|
|
|
|
| |
* libblock/include/rtems/bdbuf.h,
libblock/include/rtems/ide_part_table.h, libblock/src/blkdev.c,
libcsupport/include/rtems/termiostypes.h, libcsupport/src/termios.c,
posix/macros/rtems/posix/cond.inl,
posix/macros/rtems/posix/mutex.inl : Remove warnings.
|
|
|
|
|
| |
* libcsupport/src/lstat.c, libcsupport/src/readdir_r.c:
Include config.h.
|
|
|
|
| |
* libcsupport/src/termios.c: Remove unnecessary type casts.
|
| |
|
|
|
|
|
|
| |
Ralf Corsepius <ralf.corsepius@rtems.org>
* libcsupport/src/gxx_wrapper.c: Reflect GCC-4.0's gthr-rtems.h.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libcsupport/src/mallocfreespace.c, rtems/Makefile.am,
rtems/include/rtems/rtems/region.h, score/Makefile.am,
score/include/rtems/score/heap.h, score/src/heapgetinfo.c: Add
capability to return information about just the free blocks in a
region or heap. Also changed the semantics of free space available
to be the largest block of memory that can be allocated.
* rtems/src/regiongetfreeinfo.c, score/src/heapgetfreeinfo.c: New files.
: score/include/rtems/score/object.h,
score/src/objectinitializeinformation.c: Remove warning.
|
|
|
|
| |
* libcsupport/src/ttyname_r.c: Remove warning for using _fstat.
|
|
|
|
| |
* libcsupport/src/utsname.c: Revert yesterdays patch.
|
|
|
|
| |
* libcsupport/src/utsname.c: Fix typo.
|
|
|
|
|
|
| |
* libcsupport/include/inttypes.h: #include <sys/_inttypes.h>
* libcsupport/src/utsname.c: Don't include sptables.h.
Include <inttypes.h>. Use PRId32 instead of "%d".
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* configure.ac: Rework stdint.h/inttypes.h support.
Add RTEMS_USES_STDINT_H. Add RTEMS_USES_INTTYPES_H.
Remove NEED_STDINT_H. Remove NEED_INTTYPES_H.
Remove termios-flag detection.
* libcsupport/Makefile.am: Install include/stdint.h and
include/inttypes.h for NEWLIB only.
* libcsupport/include/stdint.h: Rework; Now newlib specific.
* libcsupport/src/termios.c: Make newlib specific.
* include/rtems/stdint.h: Rework; Now wrapper to <stdint.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libblock/include/rtems/bdbuf.h: Include <rtems/chain.h> instead of <chain.h>.
* libblock/include/rtems/ide_part_table.h: Include <rtems/chain.h> instead of <chain.h>.
* libcsupport/src/malloc.c: Include <rtems/chain.h> instead of <chain.h>.
* libcsupport/src/mount.c: Include <rtems/chain.h> instead of <chain.h>.
* libcsupport/src/unmount.c: Include <rtems/chain.h> instead of <chain.h>.
* libfs/src/imfs/imfs.h: Include <rtems/chain.h> instead of <chain.h>.
* libfs/src/imfs/imfs_directory.c: Include <rtems/chain.h> instead of <chain.h>.
* libfs/src/imfs/imfs_load_tar.c: Include <rtems/chain.h> instead of <chain.h>.
* sapi/include/confdefs.h: Include <rtems/clockdrv.h> instead of <clockdrv.h>.
* sapi/include/confdefs.h: Include <rtems/console.h> instead of <console.h>.
* libfs/src/imfs/imfs_load_tar.c: Include <rtems/imfs.h> instead of <imfs.h>.
* libmisc/shell/cmds.c: Include <rtems/imfs.h> instead of <imfs.h>.
* libmisc/fsmount/fsmount.c: Include <rtems/imfs.h> instead of <imfs.h>.
* sapi/include/confdefs.h: Include <rtems/imfs.h> instead of <imfs.h>.
* itron/src/can_wup.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/chg_pri.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/cre_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/cre_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/cre_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/cre_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/del_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/del_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/del_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/del_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/dis_dsp.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ena_dsp.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/eventflags.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/exd_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ext_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/fmempool.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/frsm_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/get_tid.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/itronintr.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/itronsem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/itrontime.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/mbox.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/mboxtranslatereturncode.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/msgbuffer.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/msgbuffertranslatereturncode.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/network.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/port.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/prcv_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/prcv_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/preq_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/psnd_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/rcv_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/rcv_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ref_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ref_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ref_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ref_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/rel_wai.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/rot_rdq.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/rsm_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/sig_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/slp_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/snd_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/snd_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/sta_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/sus_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/sysmgmt.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/task.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/ter_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/trcv_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/trcv_mbx.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/tslp_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/tsnd_mbf.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/twai_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/vmempool.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/wai_sem.c: Include <rtems/itron.h> instead of <itron.h>.
* itron/src/wup_tsk.c: Include <rtems/itron.h> instead of <itron.h>.
* sapi/include/rtems/config.h: Include <rtems/itron.h> instead of <itron.h>.
* sapi/include/confdefs.h: Include <rtems/itron.h> instead of <itron.h>.
* sapi/src/itronapi.c: Include <rtems/itron.h> instead of <itron.h>.
* sapi/include/confdefs.h: Include <rtems/rtc.h> instead of <rtc.h>.
* sapi/include/confdefs.h: Include <rtems/timerdrv.h> instead of <timerdrv.h>.
|
|
|
|
|
|
|
|
| |
* rtems/include/rtems/rtems/region.h:
Include stddef.h for size_t.
(rtems_region_get_segment_size): Use size_t instead of uint32_t for "size" (3rd arg).
* rtems/src/regiongetsegmentsize.c: Reflect changes above.
* libcsupport/src/malloc.c: Reflect changes above.
|
|
|
|
| |
* libcsupport/src/malloc.c: Remove lvalue casts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libcsupport/include/chain.h, libcsupport/include/clockdrv.h,
libcsupport/include/ringbuf.h, libcsupport/include/spurious.h,
libcsupport/include/timerdrv.h, libcsupport/include/vmeintr.h,
libcsupport/include/motorola/mc68230.h,
libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/libio.h,
libcsupport/include/rtems/libio_.h,
libcsupport/include/rtems/termiostypes.h,
libcsupport/include/zilog/z8036.h, libcsupport/include/zilog/z8530.h,
libcsupport/include/zilog/z8536.h, libcsupport/src/__gettod.c,
libcsupport/src/assoc.c, libcsupport/src/assocnamebad.c,
libcsupport/src/error.c, libcsupport/src/libio.c,
libcsupport/src/libio_sockets.c, libcsupport/src/malloc.c,
libcsupport/src/no_libc.c, libcsupport/src/termios.c,
libcsupport/src/termiosreserveresources.c: Convert to using c99
fixed-size types.
|
| |
|
|
|
|
|
|
| |
* libcsupport/src/newlibc.c, libcsupport/src/sync.c: Eliminate
warnings. Explicitly defeat __STRICT_ANSI__ since both
legitimately use routines beyond ANSI.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libblock/src/bdbuf.c, libblock/src/ramdisk.c,
libcsupport/src/newlibc.c, libcsupport/src/sync.c,
libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c,
libmisc/shell/cmds.c, libmisc/shell/shell.c,
libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c,
libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c,
libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c,
libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c,
libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c,
libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c,
libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c,
libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c,
libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c,
libnetworking/libc/res_send.c, libnetworking/libc/res_update.c,
libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c,
librpc/src/rpc/clnt_perror.c, librpc/src/rpc/svc.c,
score/macros/rtems/score/chain.inl, score/src/objectidtoname.c: Too
much was accidentally committed -- revert.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* libblock/src/bdbuf.c, libblock/src/ramdisk.c,
libcsupport/src/newlibc.c, libcsupport/src/sync.c,
libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c,
libmisc/shell/cmds.c, libmisc/shell/shell.c,
libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c,
libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c,
libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c,
libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c,
libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c,
libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c,
libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c,
libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c,
libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c,
libnetworking/libc/res_send.c, libnetworking/libc/res_update.c,
libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c,
librpc/src/rpc/clnt_perror.c, librpc/src/rpc/rtems_rpc.c,
librpc/src/rpc/svc.c, sapi/include/confdefs.h,
score/macros/rtems/score/chain.inl, score/src/objectidtoname.c:
|
|
|
|
|
|
| |
PR 524/filesystem
* src/newlibc.c: Address 1K buffer leak from incomplete cleanup of
newlib reentrancy handler.
|
|
|
|
|
|
|
| |
PR 523/filesystem
* src/malloc.c: Make malloc family safer for use from ISRs and
dispatching critical sections. If in a critical section while doing
a free(), then the free is deferred until the next malloc() attempt.
|
|
|
|
|
|
| |
PR 519/filesystem
* include/rtems/libio_.h, src/eval.c, src/rmdir.c, src/unlink.c: Check
write permissions in parent directory for file or directory delete
|
|
|
|
|
| |
* src/config.h: Remove.
* src/Makefile.am: AM_CPPFLAGS += -I$(top_builddir).
|
|
|
|
|
|
| |
PR 511/filesystem
* src/malloc.c: Add deferred free and protect against C Program Heap
operations while in a dispatch disable critical section or ISR.
|
|
|
|
|
|
| |
PR 504/rtems
* src/newlibc.c: Fix memory allocation of libc extension so it is
dispatch disabled safe See PR for detailed explanation.
|
|
|
|
|
|
|
| |
PR 498/rtems
* src/printk.c: RTEMS printk() does not support the %i format which is
used by a lot of driver/BSP etc. code. The trivial patch allows %i/%I
as an alias for %d/%D.
|
|
|
|
|
|
| |
PR 489/rtems
* src/newlibc.c: Reflect struct Thread_Control_struct.libc_reent
having changed from void * to struct _reent*.
|
|
|
|
|
| |
* src/sync.c: Don't undef __STRICT_ANSI__.
Use struct _reent (struct reent doesn't exist)
|
|
|
|
|
| |
PR 486/rtems
* src/newlib.c: Unconditionally include <stdio.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* include/chain.h, include/clockdrv.h, include/console.h,
include/iosupp.h, include/rtc.h, include/spurious.h,
include/timerdrv.h, include/vmeintr.h, include/motorola/mc68230.h,
include/rtems/libcsupport.h, include/rtems/libio.h,
include/rtems/libio_.h, include/rtems/termiostypes.h,
include/sys/termios.h, include/zilog/z8036.h, include/zilog/z8530.h,
include/zilog/z8536.h, src/__brk.c, src/__gettod.c, src/__sbrk.c,
src/__times.c, src/access.c, src/base_fs.c, src/cfgetispeed.c,
src/cfgetospeed.c, src/cfsetispeed.c, src/cfsetospeed.c, src/chdir.c,
src/chmod.c, src/chown.c, src/chroot.c, src/close.c, src/ctermid.c,
src/dup.c, src/dup2.c, src/eval.c, src/fchdir.c, src/fchmod.c,
src/fcntl.c, src/fdatasync.c, src/fpathconf.c,
src/fs_null_handlers.c, src/fstat.c, src/fsync.c, src/ftruncate.c,
src/getdents.c, src/getpwent.c, src/hosterr.c, src/ioctl.c,
src/isatty.c, src/libio.c, src/libio_sockets.c, src/link.c,
src/lseek.c, src/lstat.c, src/malloc.c, src/mallocfreespace.c,
src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mount.c, src/newlibc.c,
src/no_libc.c, src/no_posix.c, src/open.c, src/pathconf.c,
src/pipe.c, src/privateenv.c, src/read.c, src/readlink.c,
src/rewinddir.c, src/rmdir.c, src/seekdir.c, src/stat.c,
src/symlink.c, src/sync.c, src/tcdrain.c, src/tcflow.c,
src/tcflush.c, src/tcgetattr.c, src/tcgetprgrp.c, src/tcsendbreak.c,
src/tcsetattr.c, src/tcsetpgrp.c, src/telldir.c, src/termios.c,
src/termiosinitialize.c, src/truncate.c, src/umask.c, src/unixlibc.c,
src/unlink.c, src/unmount.c, src/utime.c, src/write.c: URL for
license changed.
|
|
|
|
|
|
|
| |
PR 479/rtems_misc
* src/malloc.c: Per multiple standards realloc does not free the
original memory if the allocation of the requested larger block
fails.
|
|
|
|
| |
* src/open.c: Fix typo.
|
|
|
|
| |
* src/malloc.c: Remove test define left in.
|
|
|
|
|
| |
PR 472/filesystem
src/malloc.c: Need to include apimutex.h when MALLOC_STATS is defined.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 449/rtems:
* src/getegid.c: New (Copied from ../posix/src).
* src/geteuid.c: New (Copied from ../posix/src).
* src/getgid.c: New (Copied from ../posix/src).
* src/getgroups.c: New (Copied from ../posix/src).
* src/getlogin.c: New (Copied from ../posix/src).
* src/getpgrp.c: New (Copied from ../posix/src).
* src/getpid.c: New (Copied from ../posix/src).
* src/getppid.c: New (Copied from ../posix/src).
* src/getuid.c: New (Copied from ../posix/src).
* src/setpgid.c: New (Copied from ../posix/src).
* src/setsid.c: New (Copied from ../posix/src).
* src/no_posix: Remove getpid and _getpid_r.
* Makefile.am: Reflect changes above.
|
|
|
|
|
| |
* Makefile.am: Add fileio to list of interactive tests.
* src/sync.c: New file.
|
|
|
|
|
| |
PR 442/filesystem
* src/open.c: file never closed if ftruncate() fails in open()
|