Useful patch for ACPI

From: Antony T Curtis <antony.t.curtis_at_ntlworld.com>
Date: Fri, 12 Mar 2004 22:42:29 +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
_at__at_ -60,6 +60,17 _at__at_

     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/
Received on Fri Mar 12 2004 - 13:42:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:47 UTC