From e0ccb58ad94e497bbe999eca5b2d682c0b231ae0 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Tue, 27 Jan 2004 06:07:09 +0000 Subject: [PATCH] Add TUNABLE_STR to make "hw.acpi.os_name" more correct. However, the call to getenv_string() still doesn't work. --- sys/dev/acpica/Osd/OsdTable.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpica/Osd/OsdTable.c b/sys/dev/acpica/Osd/OsdTable.c index 7d65c365b3fe..2f057d2a10a1 100644 --- a/sys/dev/acpica/Osd/OsdTable.c +++ b/sys/dev/acpica/Osd/OsdTable.c @@ -39,6 +39,7 @@ #define _COMPONENT ACPI_TABLES static char acpi_os_name[128]; +TUNABLE_STR("hw.acpi.os_name", acpi_os_name, sizeof(acpi_os_name)); ACPI_STATUS AcpiOsPredefinedOverride ( @@ -49,9 +50,7 @@ AcpiOsPredefinedOverride ( return (AE_BAD_PARAMETER); *NewVal = NULL; - - /* Allow both _OS and _OS_ to be overridden. */ - if (strncmp(InitVal->Name, "_OS", 3) == 0 && + if (strncmp(InitVal->Name, "_OS_", 4) == 0 && getenv_string("hw.acpi.os_name", acpi_os_name, sizeof(acpi_os_name))) { printf("ACPI: Overriding _OS definition with \"%s\"\n", acpi_os_name);