summaryrefslogtreecommitdiff
path: root/drivers/acpi/utilities
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-05-29 18:43:33 -0400
committerLen Brown <len.brown@intel.com>2007-05-29 18:43:33 -0400
commitae00d812436dc968f4a5dea7757b6a94910b6dc4 (patch)
tree6acd68850bead001cc74597369307a82bc711f6e /drivers/acpi/utilities
parentc420bc9f09a0926b708c3edb27eacba434a4f4ba (diff)
ACPI: extend "acpi_osi=" boot option
The boot option "acpi_osi=" has always disabled Linux _OSI support, thus disabling all OS Interface strings which are advertised by Linux to the BIOS. Now... acpi_osi="string" adds the interface string, and acpi_osi="!string" invalidates the pre-defined interface string eg. acpi_osi="!Windows 2006" would disable Linux's claim of Vista compatibility. Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/utilities')
-rw-r--r--drivers/acpi/utilities/uteval.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/acpi/utilities/uteval.c b/drivers/acpi/utilities/uteval.c
index 13d5879cd98b..a10120ad6982 100644
--- a/drivers/acpi/utilities/uteval.c
+++ b/drivers/acpi/utilities/uteval.c
@@ -59,7 +59,7 @@ acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc,
/*
* Strings supported by the _OSI predefined (internal) method.
*/
-static const char *acpi_interfaces_supported[] = {
+static char *acpi_interfaces_supported[] = {
/* Operating System Vendor Strings */
"Linux",
@@ -158,6 +158,31 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
/*******************************************************************************
*
+ * FUNCTION: acpi_osi_invalidate
+ *
+ * PARAMETERS: interface_string
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: invalidate string in pre-defiend _OSI string list
+ *
+ ******************************************************************************/
+
+acpi_status acpi_osi_invalidate(char *interface)
+{
+ int i;
+
+ for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_interfaces_supported); i++) {
+ if (!ACPI_STRCMP(interface, acpi_interfaces_supported[i])) {
+ *acpi_interfaces_supported[i] = '\0';
+ return AE_OK;
+ }
+ }
+ return AE_NOT_FOUND;
+}
+
+/*******************************************************************************
+ *
* FUNCTION: acpi_ut_evaluate_object
*
* PARAMETERS: prefix_node - Starting node