grlib: Register system console as /dev/console

Close #4461.
This commit is contained in:
Sebastian Huber
2021-06-24 08:26:02 +02:00
parent 8416e7c322
commit 499a89b11d

View File

@@ -13,8 +13,8 @@
*/
#include <bsp.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <grlib/cons.h>
#include <rtems/console.h>
@@ -65,6 +65,10 @@ static void console_dev_init(struct console_priv *con)
if (status != RTEMS_SUCCESSFUL) {
rtems_fatal_error_occurred(status);
}
if ((con->flags & FLAG_SYSCON) != 0) {
(void) link(fsname, CONSOLE_DEVICE_NAME);
}
}
/* Called by device driver to register itself to the cons interface. */