Date: Fri, 12 Mar 2004 22:42:29 +0000 From: Antony T Curtis <antony.t.curtis@ntlworld.com> To: freebsd-current@freebsd.org Subject: Useful patch for ACPI Message-ID: <1079131349.35221.7.camel@pcgem.rdg.cyberkinetica.com>
next in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1079131349.35221.7.camel>