[rtems commit] shared/console-polled.c: Use standard fatal error codes

Joel Sherrill joel at rtems.org
Tue Jul 5 15:42:36 UTC 2016


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

Author:    Joel Sherrill <joel at rtems.org>
Date:      Tue Jul  5 10:10:31 2016 -0500

shared/console-polled.c: Use standard fatal error codes

---

 c/src/lib/libbsp/shared/console-polled.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/c/src/lib/libbsp/shared/console-polled.c b/c/src/lib/libbsp/shared/console-polled.c
index 106abb1..9afe778 100644
--- a/c/src/lib/libbsp/shared/console-polled.c
+++ b/c/src/lib/libbsp/shared/console-polled.c
@@ -74,7 +74,7 @@ rtems_device_driver console_initialize(
    */
   status = rtems_io_register_name( "/dev/console", major, 0 );
   if (status != RTEMS_SUCCESSFUL)
-    rtems_fatal_error_occurred(status);
+    rtems_fatal_error_occurred(BSP_FATAL_CONSOLE_REGISTER_DEV_0);
 
   return RTEMS_SUCCESSFUL;
 }
@@ -96,8 +96,8 @@ rtems_device_driver console_open(
     0                            /* outputUsesInterrupts */
   };
 
-  assert( minor <= 1 );
-  if ( minor > 1 )
+  assert( minor == 0 );
+  if ( minor != 0 )
     return RTEMS_INVALID_NUMBER;
 
   rtems_termios_open( major, minor, arg, &pollCallbacks );




More information about the vc mailing list