patch-2.0.18 linux/init/main.c

Next file: linux/kernel/sched.c
Previous file: linux/include/linux/pagemap.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.17/linux/init/main.c linux/init/main.c
@@ -959,8 +959,17 @@
 		}
 	}
 #endif
+	
+	/*
+	 *	This keeps serial console MUCH cleaner, but does assume
+	 *	the console driver checks there really is a video device
+	 *	attached (Sparc effectively does).
+	 */
 
-	(void) open("/dev/tty1",O_RDWR,0);
+	if ((open("/dev/tty1",O_RDWR,0) < 0) &&
+	    (open("/dev/ttyS0",O_RDWR,0) < 0))
+		printk("Unable to open a initial console.\n");
+			
 	(void) dup(0);
 	(void) dup(0);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov