From d3e1c2411e3c7784c7cf892f53be6953c7105327 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Sat, 14 Feb 2004 03:17:30 +0000 Subject: Fix hw.acpi.os_name by renaming it to hw.acpi.osname. The "_name" suffix is reserved by the loader, and thus any tunable name with that suffix will be silently discarded. Document this in the header and man page so that other developers do not develop so many bumps on the head after banging it against the wall. Detective work by: Mark Santcroos, grehan --- sys/dev/acpica/Osd/OsdTable.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/acpica/Osd/OsdTable.c b/sys/dev/acpica/Osd/OsdTable.c index 2f057d2a10a1f..0b94ad3bc5db4 100644 --- a/sys/dev/acpica/Osd/OsdTable.c +++ b/sys/dev/acpica/Osd/OsdTable.c @@ -38,8 +38,8 @@ #undef _COMPONENT #define _COMPONENT ACPI_TABLES -static char acpi_os_name[128]; -TUNABLE_STR("hw.acpi.os_name", acpi_os_name, sizeof(acpi_os_name)); +static char acpi_osname[128]; +TUNABLE_STR("hw.acpi.osname", acpi_osname, sizeof(acpi_osname)); ACPI_STATUS AcpiOsPredefinedOverride ( @@ -50,11 +50,9 @@ AcpiOsPredefinedOverride ( 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; + if (strncmp(InitVal->Name, "_OS_", 4) == 0 && strlen(acpi_osname) > 0) { + printf("ACPI: Overriding _OS definition with \"%s\"\n", acpi_osname); + *NewVal = acpi_osname; } return (AE_OK); -- cgit v1.3