[rtems commit] grlib: Register system console as /dev/console
Sebastian Huber
sebh at rtems.org
Thu Jun 24 06:53:58 UTC 2021
Module: rtems
Branch: master
Commit: 499a89b11de79782a0d6b55f876f871a4823eea6
Changeset: http://git.rtems.org/rtems/commit/?id=499a89b11de79782a0d6b55f876f871a4823eea6
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Jun 24 08:26:02 2021 +0200
grlib: Register system console as /dev/console
Close #4461.
---
bsps/shared/grlib/uart/cons.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bsps/shared/grlib/uart/cons.c b/bsps/shared/grlib/uart/cons.c
index 5fa41e6..9c20193 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. */
More information about the vc
mailing list