From e53380067b65f929abfdec70b811808d04f22442 Mon Sep 17 00:00:00 2001 From: njl Date: Fri, 9 Jan 2004 20:01:42 +0000 Subject: [PATCH] Expand the check for overriding the OS name to override _OS* (including _OS_, _OS, and _OSI). This should fix this option for people who reported it not changing anything. --- sys/dev/acpica/Osd/OsdTable.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/dev/acpica/Osd/OsdTable.c b/sys/dev/acpica/Osd/OsdTable.c index f24c5ea5db4b..7d65c365b3fe 100644 --- a/sys/dev/acpica/Osd/OsdTable.c +++ b/sys/dev/acpica/Osd/OsdTable.c @@ -46,16 +46,19 @@ AcpiOsPredefinedOverride ( ACPI_STRING *NewVal) { if (InitVal == NULL || NewVal == NULL) - return(AE_BAD_PARAMETER); + return (AE_BAD_PARAMETER); *NewVal = NULL; - 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); - *NewVal = acpi_os_name; + + /* Allow both _OS and _OS_ to be overridden. */ + if (strncmp(InitVal->Name, "_OS", 3) == 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); + *NewVal = acpi_os_name; } - return(AE_OK); + return (AE_OK); } ACPI_STATUS @@ -93,4 +96,3 @@ AcpiOsTableOverride ( return(AE_OK); } -