* console.c: Make device file optional.
This commit is contained in:
Sebastian Huber
2011-03-21 08:19:19 +00:00
parent c3a42e179a
commit c08604436f
2 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
2011-03-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* console.c: Make device file optional.
2011-03-16 Jennifer Averett <jennifer.averett@OARcorp.com>
PR 1729/cpukit

View File

@@ -242,9 +242,11 @@ rtems_device_driver console_initialize(
rtems_fatal_error_occurred(sc);
}
}
sc = rtems_io_register_name(device->sDeviceName, major, minor);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(sc);
if (device->sDeviceName != NULL) {
sc = rtems_io_register_name(device->sDeviceName, major, minor);
if (sc != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(sc);
}
}
}
}