Skip site navigation (1)Skip section navigation (2)
Date:      Wed,  1 Aug 2001 14:09:25 +0400 (MSD)
From:      "Sergey A.Osokin" <osa@FreeBSD.org.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/29361: startslip can't load if_sl.ko
Message-ID:  <20010801100925.36294208@freebsd.org.ru>

next in thread | raw e-mail | index | archive | help


>Number:         29361
>Category:       bin
>Synopsis:       startslip can't load if_sl.ko
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 01 03:10:07 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Sergey A. Osokin
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
Russian FreeBSD Team
>Environment:
System: FreeBSD 5.0-CURRENT i386


>Description:
	startslip can't load if_sl.ko

>How-To-Repeat:
	1) build and install kernel without 'pseudo-device sl'
	2) try to use startslip and you find TIOCSETD

>Fix:

--- src/sbin/startslip/startslip.c.orig	Tue Jul 31 23:58:38 2001
+++ src/sbin/startslip/startslip.c	Tue Jul 31 23:58:16 2001
@@ -428,6 +428,21 @@
 	 * Attach
 	 */
 	printd("setd");
+
+	/*
+	 * Attempt to load the SLIP interface KLD if it isn't loaded
+	 * already.
+	 */
+#if defined(__FreeBSD__) && !defined(NOKLDLOAD)
+	if (modfind("if_sl") == -1) {
+ 		if (kldload("if_sl") == -1) {
+			syslog(LOG_ERR, "kldload if_sl: %s\n",
+			   strerror(errno));
+			down(2);
+		}
+	}
+#endif
+
 	disc = SLIPDISC;
 	if (ioctl(fd, TIOCSETD, &disc) < 0) {
 		syslog(LOG_ERR, "%s: ioctl (%s, TIOCSETD): %m",
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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