Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2008 14:13:15 GMT
From:      Ed Schouten <ed@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 152017 for review
Message-ID:  <200810271413.m9REDFFs014608@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152017

Change 152017 by ed@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));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810271413.m9REDFFs014608>