diff options
author | Daniel Hellstrom <daniel@gaisler.com> | 2020-05-06 23:23:43 +0200 |
---|---|---|
committer | Daniel Hellstrom <daniel@gaisler.com> | 2020-09-02 10:53:07 +0200 |
commit | 31cdf0da6073a8ee55e1de4b4d72c02f0105d698 (patch) | |
tree | e58ac2a1719121ef3b6d72b0e1e36871259b9c69 | |
parent | 7f615039a7065b497053a809fcf082fee387f11e (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; |