PERFORCE change 152017 for review

Ed Schouten ed at FreeBSD.org
Mon Oct 27 14:13:16 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=152017

Change 152017 by ed at ed_dull on 2008/10/27 14:12:27

	Make our system run properly if we have no console device.

Affected files ...

.. //depot/projects/mpsafetty/sys/kern/tty.c#61 edit

Differences ...

==== //depot/projects/mpsafetty/sys/kern/tty.c#61 (text+ko) ====

@@ -1755,6 +1755,10 @@
 {
 	struct tty *tp;
 
+	/* System has no console device. */
+	if (dev_console_filename == NULL)
+		return (ENXIO);
+
 	/* Look up corresponding TTY by device name. */
 	sx_slock(&tty_list_sx);
 	TAILQ_FOREACH(tp, &tty_list, t_list) {
@@ -1765,9 +1769,8 @@
 	}
 	sx_sunlock(&tty_list_sx);
 
-	/* Still no TTY associated by that name. */
 	if (dev_console->si_drv1 == NULL)
-		return (ENXIO);
+		panic("Device driver uses name of nonexistent TTY");
 	
 	return (ttydev_open(dev, oflags, devtype, td));
 }


More information about the p4-projects mailing list