aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2008-09-23 22:16:23 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2008-09-23 22:16:23 +0000
commitd3e5e8d1b6788875a255fbbcf0a27a6820ea1288 (patch)
tree421387f3ca902120182cb7252621ff2fe7a6da8c /sys
parent28b53d8cbdce31f5058ee49f7d5c79e86aaf4fb7 (diff)
downloadsrc-d3e5e8d1b6788875a255fbbcf0a27a6820ea1288.tar.gz
src-d3e5e8d1b6788875a255fbbcf0a27a6820ea1288.zip
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
Notes
Notes: svn path=/head/; revision=183317
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/ofw/ofw_syscons.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/powerpc/ofw/ofw_syscons.c b/sys/powerpc/ofw/ofw_syscons.c
index d93c5bcc3364..7ea849795b9c 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));