[rtems commit] Filesystem: Change error indication

Joel Sherrill joel at rtems.org
Thu Mar 29 14:14:28 UTC 2012


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Feb 24 09:54:44 2012 +0100

Filesystem: Change error indication

Change error indication to ESPIPE in rtems_filesystem_default_lseek().

---

 cpukit/libcsupport/include/rtems/libio.h  |    2 +-
 cpukit/libfs/src/defaults/default_lseek.c |   10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index e17a438..f883d66 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1014,7 +1014,7 @@ int rtems_filesystem_default_ioctl(
 );
 
 /**
- * @retval -1 Always.  The errno is set to ENOTSUP.
+ * @retval -1 Always.  The errno is set to ESPIPE.
  *
  * @see rtems_filesystem_lseek_t.
  */
diff --git a/cpukit/libfs/src/defaults/default_lseek.c b/cpukit/libfs/src/defaults/default_lseek.c
index 09a691e..02bd369 100644
--- a/cpukit/libfs/src/defaults/default_lseek.c
+++ b/cpukit/libfs/src/defaults/default_lseek.c
@@ -9,15 +9,17 @@
  *  $Id$
  */
 
-#include <rtems/libio.h>
+#if HAVE_CONFIG_H
+  #include "config.h"
+#endif
+
 #include <rtems/libio_.h>
-#include <rtems/seterr.h>
 
 off_t rtems_filesystem_default_lseek(
   rtems_libio_t *iop,
-  off_t          length,
+  off_t          offset,
   int            whence
 )
 {
-  rtems_set_errno_and_return_minus_one( ENOTSUP );
+  rtems_set_errno_and_return_minus_one( ESPIPE );
 }




More information about the vc mailing list