[rtems commit] Return EINVAL in default ftruncate() handler

Sebastian Huber sebh at rtems.org
Fri Oct 11 14:16:40 UTC 2013


Module:    rtems
Branch:    master
Commit:    3c2bb2238a1a07b47ec9ed9247674ab940ddfb13
Changeset: http://git.rtems.org/rtems/commit/?id=3c2bb2238a1a07b47ec9ed9247674ab940ddfb13

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Oct 11 16:22:00 2013 +0200

Return EINVAL in default ftruncate() handler

According to POSIX this case is implementation defined.  Linux and
FreeBSD return EINVAL.

---

 cpukit/libfs/src/defaults/default_ftruncate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cpukit/libfs/src/defaults/default_ftruncate.c b/cpukit/libfs/src/defaults/default_ftruncate.c
index 8016956..53cc489 100644
--- a/cpukit/libfs/src/defaults/default_ftruncate.c
+++ b/cpukit/libfs/src/defaults/default_ftruncate.c
@@ -26,5 +26,5 @@ int rtems_filesystem_default_ftruncate(
   off_t          length
 )
 {
-  rtems_set_errno_and_return_minus_one( ENOTSUP );
+  rtems_set_errno_and_return_minus_one( EINVAL );
 }




More information about the vc mailing list