diff options
author | takawata <takawata@FreeBSD.org> | 2000-10-31 11:54:10 +0000 |
---|---|---|
committer | takawata <takawata@FreeBSD.org> | 2000-10-31 11:54:10 +0000 |
commit | 1f7d1df733cba8003f78ea73b609bf5ad47db279 (patch) | |
tree | 3376baf8bb6d3d036b1bb16b0d997785c1191311 /sys/dev | |
parent | b18bf4b787d5b12f54fa77f76b28fb84f1dff55e (diff) | |
download | FreeBSD-src-1f7d1df733cba8003f78ea73b609bf5ad47db279.zip FreeBSD-src-1f7d1df733cba8003f78ea73b609bf5ad47db279.tar.gz |
If acpica driver is loaded using kldload(8), warn and just ignore.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/acpica/acpi.c | 5 | ||||
-rw-r--r-- | sys/dev/acpica/acpi_isa.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index 651a7737..8f5c052 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -162,6 +162,11 @@ acpi_identify(driver_t *driver, device_t parent) char *debugpoint = getenv("debug.acpi.debugger"); #endif + if(!cold){ + printf("Don't load this driver from userland!!\n"); + return ; + } + /* * Make sure we're not being doubly invoked. */ diff --git a/sys/dev/acpica/acpi_isa.c b/sys/dev/acpica/acpi_isa.c index 3aa03c1..19d7b5f 100644 --- a/sys/dev/acpica/acpi_isa.c +++ b/sys/dev/acpica/acpi_isa.c @@ -136,6 +136,11 @@ acpi_isa_identify(driver_t *driver, device_t bus) ACPI_HANDLE parent; ACPI_STATUS status; + /*If this driver is loaded from userland ,just ignore*/ + if(!cold){ + return; + } + /* * Look for the _SB_ scope, which will contain all the devices * we are likely to support. |