From owner-freebsd-current@FreeBSD.ORG Fri Mar 12 14:42:33 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A340116A4CE for ; Fri, 12 Mar 2004 14:42:33 -0800 (PST) Received: from mta06-svc.ntlworld.com (mta06-svc.ntlworld.com [62.253.162.46]) by mx1.FreeBSD.org (Postfix) with ESMTP id A98D343D2F for ; Fri, 12 Mar 2004 14:42:32 -0800 (PST) (envelope-from antony.t.curtis@ntlworld.com) Received: from [10.10.10.100] ([81.98.106.69]) by mta06-svc.ntlworld.com (InterMail vM.4.01.03.37 201-229-121-137-20020806) with ESMTP id <20040312224233.EXLV19383.mta06-svc.ntlworld.com@[10.10.10.100]> for ; Fri, 12 Mar 2004 22:42:33 +0000 From: Antony T Curtis To: freebsd-current@freebsd.org Content-Type: text/plain Message-Id: <1079131349.35221.7.camel@pcgem.rdg.cyberkinetica.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Fri, 12 Mar 2004 22:42:29 +0000 Content-Transfer-Encoding: 7bit Subject: Useful patch for ACPI X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Mar 2004 22:42:33 -0000 Hi guys, I have a small patch here which allows additional modules be loaded at boot time along with acpi... Useful for including acpi_video and acpi_toshiba, just by having: acpi_modules="acpi_video,acpi_toshiba" --- 1.4/src/sys/boot/i386/libi386/i386_module.c Tue Aug 26 01:13:21 2003 +++ ?/i386_module.c Fri Mar 12 22:47:59 2004 @@ -60,6 +60,17 @@ if (getenv("acpi_load") && (!disabled)) { error = mod_load("acpi", NULL, 0, NULL); + if (!error && ((rv = getenv("acpi_modules")) != NULL)) { + char *nv = index(rv, ','); + if ( nv != NULL ) + *(nv++) = (char) 0; + while ( rv != NULL ) { + mod_load(rv, NULL, 0, NULL); + if ((rv = nv) != NULL) + if ((nv = index(rv, ',')) != NULL) + *(nv++) = (char) 0; + } + } if (error != 0) printf("ACPI autoload failed - %s\n", strerror(error)); -- Antony T Curtis BSc Unix Analyst Programmer http://homepage.ntlworld.com/antony.t.curtis/