[rtems commit] rtems: Remove deprecated rtems_io_lookup_name()
Sebastian Huber
sebh at rtems.org
Tue Jul 14 05:26:19 UTC 2020
Module: rtems
Branch: master
Commit: dc4879bba4ce91b86b4cfcea0a0f8dd7450e2d00
Changeset: http://git.rtems.org/rtems/commit/?id=dc4879bba4ce91b86b4cfcea0a0f8dd7450e2d00
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu May 28 15:24:19 2020 +0200
rtems: Remove deprecated rtems_io_lookup_name()
Close #3420.
---
cpukit/include/rtems/io.h | 17 +----------------
cpukit/libfs/src/imfs/ioman.c | 21 ---------------------
testsuites/sptests/sp21/init.c | 21 ---------------------
3 files changed, 1 insertion(+), 58 deletions(-)
diff --git a/cpukit/include/rtems/io.h b/cpukit/include/rtems/io.h
index 972a0aa..f4066b6 100644
--- a/cpukit/include/rtems/io.h
+++ b/cpukit/include/rtems/io.h
@@ -4,7 +4,7 @@
* @brief Classic Input/Output Manager API
*
* This file emulates the old Classic RTEMS IO manager directives
- * which register and lookup names using the in-memory filesystem.
+ * which register names using the in-memory filesystem.
*/
/*
@@ -231,21 +231,6 @@ rtems_status_code rtems_io_control(
/** @} */
-typedef struct {
- const char *device_name;
- size_t device_name_length;
- rtems_device_major_number major;
- rtems_device_minor_number minor;
-} rtems_driver_name_t;
-
-/**
- * @deprecated Use stat() instead.
- */
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t *device_info
-) RTEMS_DEPRECATED;
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/libfs/src/imfs/ioman.c b/cpukit/libfs/src/imfs/ioman.c
index 59b93e4..55fb172 100644
--- a/cpukit/libfs/src/imfs/ioman.c
+++ b/cpukit/libfs/src/imfs/ioman.c
@@ -45,24 +45,3 @@ rtems_status_code rtems_io_register_name(
return RTEMS_SUCCESSFUL;
}
-
-rtems_status_code rtems_io_lookup_name(
- const char *name,
- rtems_driver_name_t *device_info
-)
-{
- rtems_status_code sc = RTEMS_SUCCESSFUL;
- struct stat st;
- int rv = stat( name, &st );
-
- if ( rv == 0 && S_ISCHR( st.st_mode ) ) {
- device_info->device_name = name;
- device_info->device_name_length = strlen( name );
- device_info->major = rtems_filesystem_dev_major_t( st.st_rdev );
- device_info->minor = rtems_filesystem_dev_minor_t( st.st_rdev );
- } else {
- sc = RTEMS_UNSATISFIED;
- }
-
- return sc;
-}
diff --git a/testsuites/sptests/sp21/init.c b/testsuites/sptests/sp21/init.c
index f44f2ba..bd0ae2b 100644
--- a/testsuites/sptests/sp21/init.c
+++ b/testsuites/sptests/sp21/init.c
@@ -21,7 +21,6 @@ const char rtems_test_name[] = "SP 21";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
void do_test_io_manager(void);
-void do_test_io_lookup_name(void);
void do_test_zero_driver(void);
#define PRIurtems_device_major_number PRIu32
@@ -193,24 +192,6 @@ void do_test_io_manager(void)
puts( "rtems_io_unregister_driver - RTEMS_SUCCESSFUL" );
}
-void do_test_io_lookup_name(void)
-{
- rtems_status_code sc;
- rtems_driver_name_t info;
-
- puts( "rtems_io_lookup_name( \"\", &info ) - RTEMS_UNSATISFIED" );
- sc = rtems_io_lookup_name( "", &info );
- fatal_directive_status( sc, RTEMS_UNSATISFIED, "lookup empty string" );
-
- puts( "rtems_io_lookup_name( \"/dev\", &info ) - RTEMS_UNSATISFIED" );
- sc = rtems_io_lookup_name( "/dev", &info );
- fatal_directive_status( sc, RTEMS_UNSATISFIED, "lookup empty string" );
-
- puts( "rtems_io_lookup_name( \"/dev/null\", &info ) - RTEMS_SUCCESSFUL" );
- sc = rtems_io_lookup_name( "/dev/null", &info );
- directive_failed( sc, "lookup /dev/null" );
-}
-
void do_test_zero_driver(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
@@ -258,8 +239,6 @@ rtems_task Init(
do_test_io_manager();
- do_test_io_lookup_name();
-
do_test_zero_driver();
TEST_END();
More information about the vc
mailing list