[rtems commit] Filesystem: Use ENOTTY for default ioctl() handler

Sebastian Huber sebh at rtems.org
Thu Oct 31 13:26:32 UTC 2013


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Oct 31 14:17:57 2013 +0100

Filesystem: Use ENOTTY for default ioctl() handler

This is in line with Linux and FreeBSD.

---

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

diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h
index 903991b..aa64ff3 100644
--- a/cpukit/libcsupport/include/rtems/libio.h
+++ b/cpukit/libcsupport/include/rtems/libio.h
@@ -1009,7 +1009,7 @@ ssize_t rtems_filesystem_default_write(
 );
 
 /**
- * @retval -1 Always.  The errno is set to ENOTSUP.
+ * @retval -1 Always.  The errno is set to ENOTTY.
  *
  * @see rtems_filesystem_ioctl_t.
  */
diff --git a/cpukit/libfs/src/defaults/default_ioctl.c b/cpukit/libfs/src/defaults/default_ioctl.c
index f9e9a9c..5df2281 100644
--- a/cpukit/libfs/src/defaults/default_ioctl.c
+++ b/cpukit/libfs/src/defaults/default_ioctl.c
@@ -26,5 +26,5 @@ int rtems_filesystem_default_ioctl(
   void            *buffer
 )
 {
-  rtems_set_errno_and_return_minus_one( ENOTSUP );
+  rtems_set_errno_and_return_minus_one( ENOTTY );
 }




More information about the vc mailing list