diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-24 08:26:02 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2021-06-24 08:27:21 +0200 |
commit | 499a89b11de79782a0d6b55f876f871a4823eea6 (patch) | |
tree | 29fb1f7b08eb75339119d098d9e5125edad8d3aa /bsps/shared/grlib/uart/cons.c | |
parent | bsps/powerpc, bsps/shared: Move remaining legacy networking header files (diff) | |
download | rtems-499a89b11de79782a0d6b55f876f871a4823eea6.tar.bz2 |
grlib: Register system console as /dev/console
Close #4461.
Diffstat (limited to '')
-rw-r--r-- | bsps/shared/grlib/uart/cons.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bsps/shared/grlib/uart/cons.c b/bsps/shared/grlib/uart/cons.c index 5fa41e6914..9c20193b3c 100644 --- a/bsps/shared/grlib/uart/cons.c +++ b/bsps/shared/grlib/uart/cons.c @@ -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. */ |