summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/common/dmextern.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/common/dmextern.c')
-rw-r--r--sys/contrib/dev/acpica/common/dmextern.c89
1 files changed, 89 insertions, 0 deletions
diff --git a/sys/contrib/dev/acpica/common/dmextern.c b/sys/contrib/dev/acpica/common/dmextern.c
index 7479910..a78fa3f 100644
--- a/sys/contrib/dev/acpica/common/dmextern.c
+++ b/sys/contrib/dev/acpica/common/dmextern.c
@@ -312,6 +312,95 @@ Cleanup:
/*******************************************************************************
*
+ * FUNCTION: AcpiDmAddToExternalFileList
+ *
+ * PARAMETERS: PathList - Single path or list separated by comma
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Add external files to global list
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDmAddToExternalFileList (
+ char *PathList)
+{
+ ACPI_EXTERNAL_FILE *ExternalFile;
+ char *Path;
+ char *TmpPath;
+
+
+ if (!PathList)
+ {
+ return (AE_OK);
+ }
+
+ Path = strtok (PathList, ",");
+
+ while (Path)
+ {
+ TmpPath = ACPI_ALLOCATE_ZEROED (ACPI_STRLEN (Path) + 1);
+ if (!TmpPath)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ ACPI_STRCPY (TmpPath, Path);
+
+ ExternalFile = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EXTERNAL_FILE));
+ if (!ExternalFile)
+ {
+ ACPI_FREE (TmpPath);
+ return (AE_NO_MEMORY);
+ }
+
+ ExternalFile->Path = TmpPath;
+
+ if (AcpiGbl_ExternalFileList)
+ {
+ ExternalFile->Next = AcpiGbl_ExternalFileList;
+ }
+
+ AcpiGbl_ExternalFileList = ExternalFile;
+ Path = strtok (NULL, ",");
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmClearExternalFileList
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Clear the external file list
+ *
+ ******************************************************************************/
+
+void
+AcpiDmClearExternalFileList (
+ void)
+{
+ ACPI_EXTERNAL_FILE *NextExternal;
+
+
+ while (AcpiGbl_ExternalFileList)
+ {
+ NextExternal = AcpiGbl_ExternalFileList->Next;
+ ACPI_FREE (AcpiGbl_ExternalFileList->Path);
+ ACPI_FREE (AcpiGbl_ExternalFileList);
+ AcpiGbl_ExternalFileList = NextExternal;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmAddToExternalList
*
* PARAMETERS: Op - Current parser Op
OpenPOWER on IntegriCloud