diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2020-05-06 23:23:43 +0200 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2021-08-26 11:47:43 +0200 |
commit | 9ebbc11c6cfe00ac843e418b42cadfc33976bd02 (patch) | |
tree | 86ed0ed89959b6a49d8c8dcd7bd8cfef5ebd2149 | |
parent | ee83452c68bbe471d3af54d9d8038ddfe91f8f8c (diff) |
leon,uart: if dev selected sys console force fs-name
-rw-r--r-- | bsps/shared/grlib/uart/cons.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/bsps/shared/grlib/uart/cons.c b/bsps/shared/grlib/uart/cons.c index 5fa41e6914..e21be53d27 100644 --- a/bsps/shared/grlib/uart/cons.c +++ b/bsps/shared/grlib/uart/cons.c @@ -43,15 +43,13 @@ static void console_dev_init(struct console_priv *con) { char name[16], *fsname; rtems_status_code status; - int minor; - minor = con->minor; - if (!con->dev->fsname) { + if (!con->dev->fsname || (con->flags & FLAG_SYSCON)) { strcpy(name, "/dev/console_a"); /* Special console name and MINOR for SYSTEM CONSOLE */ - if (minor == 0) + if (con->minor == 0) name[12] = '\0'; /* /dev/console */ - name[13] += minor; /* when minor=0, this has no effect... */ + name[13] += con->minor; /* when minor=0, this has no effect... */ fsname = name; } else { fsname = con->dev->fsname; |