diff options
author | jake <jake@FreeBSD.org> | 2003-11-11 18:01:44 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2003-11-11 18:01:44 +0000 |
commit | db726f026bf78f402dba4404d952954e6e31c245 (patch) | |
tree | 5027ec2b0730b2b55f741b4cf078747feef678e0 /sys/boot | |
parent | be846dcb4f915daba6661bf1dec627055eb22c0c (diff) | |
download | FreeBSD-src-db726f026bf78f402dba4404d952954e6e31c245.zip FreeBSD-src-db726f026bf78f402dba4404d952954e6e31c245.tar.gz |
Set RB_SERIAL in boothowto if the firmware output-device is ttya or ttyb.
This ensures that uart gets a higher console priority than syscons when
a serial console is being used. Testing against the "console" environment
variable doesn't make sense since we only have one loader console driver.
Diffstat (limited to 'sys/boot')
-rw-r--r-- | sys/boot/sparc64/loader/metadata.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/boot/sparc64/loader/metadata.c b/sys/boot/sparc64/loader/metadata.c index a4122a8..9bb8af0 100644 --- a/sys/boot/sparc64/loader/metadata.c +++ b/sys/boot/sparc64/loader/metadata.c @@ -67,6 +67,8 @@ static struct int md_getboothowto(char *kargs) { + char buf[32]; + phandle_t options; char *cp; int howto; int active; @@ -126,10 +128,10 @@ md_getboothowto(char *kargs) for (i = 0; howto_names[i].ev != NULL; i++) if (getenv(howto_names[i].ev) != NULL) howto |= howto_names[i].mask; - if (!strcmp(getenv("console"), "comconsole")) - howto |= RB_SERIAL; - if (!strcmp(getenv("console"), "nullconsole")) - howto |= RB_MUTE; + options = OF_finddevice("/options"); + OF_getprop(options, "output-device", buf, sizeof(buf)); + if (strcmp(buf, "ttya") == 0 || strcmp(buf, "ttyb") == 0) + howto |= RB_SERIAL; return(howto); } |