From db726f026bf78f402dba4404d952954e6e31c245 Mon Sep 17 00:00:00 2001 From: jake Date: Tue, 11 Nov 2003 18:01:44 +0000 Subject: 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. --- sys/boot/sparc64/loader/metadata.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/boot/sparc64') 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); } -- cgit v1.1