Index: c/src/lib/libbsp/m68k/mvme136/console/console.c
===================================================================
--- c/src/lib/libbsp/m68k/mvme136/console/console.c	(revision ac7d5ef06a6d6e8d84abbd1f0b82162725f98326)
+++ c/src/lib/libbsp/m68k/mvme136/console/console.c	(revision 3a4ae6c210bcc37754767966f1128ae23c77b6af)
@@ -15,7 +15,6 @@
 #define M136_INIT
 
-#include <rtems.h>
-#include "console.h"
-#include "bsp.h"
+#include <bsp.h>
+#include <rtems/libio.h>
 
 /*  console_initialize
@@ -33,12 +32,22 @@
   rtems_device_major_number  major,
   rtems_device_minor_number  minor,
-  void                      *arg,
-  rtems_id                   self,
-  rtems_unsigned32          *status
-)
-{
+  void                      *arg
+)
+{
+  rtems_status_code status;
+
   _Write_m681 = ( struct w_m681_info * ) M681ADDR;
   _Read_m681 = ( struct r_m681_info * ) M681ADDR;
-  *status = RTEMS_SUCCESSFUL;
+
+  status = rtems_io_register_name(
+    "/dev/console",
+    major,
+    (rtems_device_minor_number) 0
+  );
+
+  if (status != RTEMS_SUCCESSFUL)
+    rtems_fatal_error_occurred(status);
+ 
+  return RTEMS_SUCCESSFUL;
 }
 
@@ -113,47 +122,101 @@
 
 /*
- * __read  -- read bytes from the serial port. Ignore fd, since
- *            we only have stdin.
- */
-
-int __read(
-  int fd,
-  char *buf,
-  int nbytes
-)
-{
-  int i = 0;
-
-  for (i = 0; i < nbytes; i++) {
-    *(buf + i) = inbyte();
-    if ((*(buf + i) == '\n') || (*(buf + i) == '\r')) {
-      (*(buf + i++)) = '\n';
-      (*(buf + i)) = 0;
+ *  Open entry point
+ */
+
+rtems_device_driver console_open(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return RTEMS_SUCCESSFUL;
+}
+ 
+/*
+ *  Close entry point
+ */
+
+rtems_device_driver console_close(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return RTEMS_SUCCESSFUL;
+}
+
+/*
+ * read bytes from the serial port. We only have stdin.
+ */
+
+rtems_device_driver console_read(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  rtems_libio_rw_args_t *rw_args;
+  char *buffer;
+  int maximum;
+  int count = 0;
+ 
+  rw_args = (rtems_libio_rw_args_t *) arg;
+
+  buffer = rw_args->buffer;
+  maximum = rw_args->count;
+
+  for (count = 0; count < maximum; count++) {
+    buffer[ count ] = inbyte();
+    if (buffer[ count ] == '\n' || buffer[ count ] == '\r') {
+      buffer[ count++ ]  = '\n';
+      buffer[ count ]  = 0;
       break;
     }
   }
-  return (i);
-}
-
-/*
- * __write -- write bytes to the serial port. Ignore fd, since
- *            stdout and stderr are the same. Since we have no filesystem,
- *            open will only return an error.
- */
-
-int __write(
-  int fd,
-  char *buf,
-  int nbytes
-)
-{
-  int i;
-
-  for (i = 0; i < nbytes; i++) {
-    if (*(buf + i) == '\n') {
-      outbyte ('\r');
+
+  rw_args->bytes_moved = count;
+  return (count >= 0) ? RTEMS_SUCCESSFUL : RTEMS_UNSATISFIED;
+}
+
+/*
+ * write bytes to the serial port. Stdout and stderr are the same. 
+ */
+
+rtems_device_driver console_write(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  int count;
+  int maximum;
+  rtems_libio_rw_args_t *rw_args;
+  char *buffer;
+
+  rw_args = (rtems_libio_rw_args_t *) arg;
+
+  buffer = rw_args->buffer;
+  maximum = rw_args->count;
+
+  for (count = 0; count < maximum; count++) {
+    if ( buffer[ count ] == '\n') {
+      outbyte('\r');
     }
-    outbyte (*(buf + i));
+    outbyte( buffer[ count ] );
   }
-  return (nbytes);
-}
+  return maximum;
+}
+
+/*
+ *  IO Control entry point
+ */
+
+rtems_device_driver console_control(
+  rtems_device_major_number major,
+  rtems_device_minor_number minor,
+  void                    * arg
+)
+{
+  return RTEMS_SUCCESSFUL;
+}
