diff options
author | Daniel Ramirez <javamonn@gmail.com> | 2013-12-06 12:21:20 -0600 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-01-08 15:24:09 -0600 |
commit | 35b8f48a4b18a605945f149601a8ff8c9bc11fd6 (patch) | |
tree | 305db372660ba0f2ab7c267ac30143006ec5bc2d /cpukit/libcsupport/src/sup_fs_deviceio.c | |
parent | powerpc/mvme3100: Improve Doxygen (diff) | |
download | rtems-35b8f48a4b18a605945f149601a8ff8c9bc11fd6.tar.bz2 |
libcsupport: Refactor rtems_deviceio_errno
Renames rtems_deviceio_errno to rtems_status_code_to_errno and
integrates it into the Classic API Status Handler. This function
can now be called by including status.h
Diffstat (limited to 'cpukit/libcsupport/src/sup_fs_deviceio.c')
-rw-r--r-- | cpukit/libcsupport/src/sup_fs_deviceio.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/cpukit/libcsupport/src/sup_fs_deviceio.c b/cpukit/libcsupport/src/sup_fs_deviceio.c index 67e035301a..6407e637fc 100644 --- a/cpukit/libcsupport/src/sup_fs_deviceio.c +++ b/cpukit/libcsupport/src/sup_fs_deviceio.c @@ -6,7 +6,7 @@ */ /* - * COPYRIGHT (c) 1989-2012. + * COPYRIGHT (c) 1989-2013. * On-Line Applications Research Corporation (OAR). * * The license and distribution terms for this file may be @@ -19,6 +19,7 @@ #endif #include <rtems/deviceio.h> +#include <rtems/rtems/status.h> int rtems_deviceio_open( rtems_libio_t *iop, @@ -38,7 +39,7 @@ int rtems_deviceio_open( status = rtems_io_open( major, minor, &args ); - return rtems_deviceio_errno( status ); + return rtems_status_code_to_errno( status ); } int rtems_deviceio_close( @@ -56,7 +57,7 @@ int rtems_deviceio_close( status = rtems_io_close( major, minor, &args ); - return rtems_deviceio_errno( status ); + return rtems_status_code_to_errno( status ); } ssize_t rtems_deviceio_read( @@ -83,7 +84,7 @@ ssize_t rtems_deviceio_read( return (ssize_t) args.bytes_moved; } else { - return rtems_deviceio_errno( status ); + return rtems_status_code_to_errno( status ); } } @@ -111,7 +112,7 @@ ssize_t rtems_deviceio_write( return (ssize_t) args.bytes_moved; } else { - return rtems_deviceio_errno( status ); + return rtems_status_code_to_errno( status ); } } @@ -134,6 +135,6 @@ int rtems_deviceio_control( if ( status == RTEMS_SUCCESSFUL ) { return args.ioctl_return; } else { - return rtems_deviceio_errno(status); + return rtems_status_code_to_errno(status); } } |