summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
diff options
context:
space:
mode:
authoriwasaki <iwasaki@FreeBSD.org>2002-09-05 11:16:23 +0000
committeriwasaki <iwasaki@FreeBSD.org>2002-09-05 11:16:23 +0000
commit84ffd810eac3036145c892edcd319e1b834e5a1a (patch)
tree70d6cd1294faf6f46544b12184d4716f6b5197b2 /sys/boot/i386
parentfcab7b83891114705bda4a354e289b3dcd867bac (diff)
downloadFreeBSD-src-84ffd810eac3036145c892edcd319e1b834e5a1a.zip
FreeBSD-src-84ffd810eac3036145c892edcd319e1b834e5a1a.tar.gz
Parse hint.acpi.0.disabled correctly.
Now that hint.acpi.0.disabled="0" won't disable acpi as expected. Pointed-out by: bde
Diffstat (limited to 'sys/boot/i386')
-rw-r--r--sys/boot/i386/libi386/i386_module.c12
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 f879727..a7f5d56 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);
}
OpenPOWER on IntegriCloud