diff options
| -rw-r--r-- | sys/boot/i386/libi386/i386_module.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/boot/i386/libi386/i386_module.c b/sys/boot/i386/libi386/i386_module.c index f87972783b2d..a7f5d566e07c 100644 --- a/sys/boot/i386/libi386/i386_module.c +++ b/sys/boot/i386/libi386/i386_module.c @@ -44,16 +44,24 @@ int i386_autoload(void) { int error; + int disabled; + char *rv; /* XXX use PnP to locate stuff here */ /* autoload ACPI support */ /* XXX should be in 4th keyed off acpi_load */ - if ((getenv("acpi_load") && !getenv("hint.acpi.0.disabled"))) { + disabled = 0; + rv = getenv("hint.acpi.0.disabled"); + if (rv != NULL && strncmp(rv, "0", 1) != 0) { + disabled = 1; + } + + if (getenv("acpi_load") && (!disabled)) { error = mod_load("acpi", NULL, 0, NULL); if (error != 0) printf("ACPI autoload failed - %s\n", strerror(error)); } - + return(0); } |
