diff options
author | sobomax <sobomax@FreeBSD.org> | 2008-09-23 22:16:23 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2008-09-23 22:16:23 +0000 |
commit | f49c21865d782096d72b282cfafdbd3cc76cff37 (patch) | |
tree | 421387f3ca902120182cb7252621ff2fe7a6da8c | |
parent | b416ba242b0c48dc694985c9a6fe61cde9054ea1 (diff) | |
download | FreeBSD-src-f49c21865d782096d72b282cfafdbd3cc76cff37.zip FreeBSD-src-f49c21865d782096d72b282cfafdbd3cc76cff37.tar.gz |
Improve rev 183168, so that if /chosen/stdout is connected to the serial
port by OF the syscons won't take over console. Only attach syscons to "screen"
if /chosen/stdout is not connected, which could be the case when loader(8)
is booted directly from the OF. This fixes Marcel's Xserver.
Reported by: marcel
-rw-r--r-- | sys/powerpc/ofw/ofw_syscons.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/powerpc/ofw/ofw_syscons.c b/sys/powerpc/ofw/ofw_syscons.c index d93c5bc..7ea8497 100644 --- a/sys/powerpc/ofw/ofw_syscons.c +++ b/sys/powerpc/ofw/ofw_syscons.c @@ -234,17 +234,16 @@ ofwfb_configure(int flags) chosen = OF_finddevice("/chosen"); OF_getprop(chosen, "stdout", &stdout, sizeof(stdout)); node = OF_instance_to_package(stdout); - OF_getprop(node, "device_type", type, sizeof(type)); - if (strcmp(type, "display") != 0) { + if (node == -1) { /* - * Attaching to "/chosen/stdout" has failed, try + * The "/chosen/stdout" does not exist try * using "screen" directly. */ node = OF_finddevice("screen"); - OF_getprop(node, "device_type", type, sizeof(type)); - if (strcmp(type, "display") != 0) - return (0); } + OF_getprop(node, "device_type", type, sizeof(type)); + if (strcmp(type, "display") != 0) + return (0); /* Only support 8 and 32-bit framebuffers */ OF_getprop(node, "depth", &depth, sizeof(depth)); |