aboutsummaryrefslogtreecommitdiff
path: root/source/os_specific
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2014-03-27 23:50:54 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2014-03-27 23:50:54 +0000
commit7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd (patch)
treed3e9e38245f10de28c87606c945c7fdd4bed0d76 /source/os_specific
parent526d99544ba42a5a2155021975b3b97da425819e (diff)
downloadsrc-7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd.tar.gz
src-7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd.zip
Import ACPICA 20140325.vendor/acpica/20140325
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=263851 svn path=/vendor-sys/acpica/20140325/; revision=263852; tag=vendor/acpica/20140325
Diffstat (limited to 'source/os_specific')
-rw-r--r--source/os_specific/service_layers/oslinuxtbl.c32
-rw-r--r--source/os_specific/service_layers/osunixdir.c2
-rw-r--r--source/os_specific/service_layers/osunixxf.c2
-rw-r--r--source/os_specific/service_layers/oswintbl.c26
-rw-r--r--source/os_specific/service_layers/oswinxf.c2
5 files changed, 35 insertions, 29 deletions
diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c
index 551f0b75eab9..f6e94c061235 100644
--- a/source/os_specific/service_layers/oslinuxtbl.c
+++ b/source/os_specific/service_layers/oslinuxtbl.c
@@ -55,9 +55,9 @@
/* List of information about obtained ACPI tables */
-typedef struct table_info
+typedef struct osl_table_info
{
- struct table_info *Next;
+ struct osl_table_info *Next;
UINT32 Instance;
char Signature[ACPI_NAME_SIZE];
@@ -253,22 +253,22 @@ AcpiOsGetTableByAddress (
if (TableLength == 0)
{
Status = AE_BAD_HEADER;
- goto ErrorExit;
+ goto Exit;
}
LocalTable = calloc (1, TableLength);
if (!LocalTable)
{
Status = AE_NO_MEMORY;
- goto ErrorExit;
+ goto Exit;
}
ACPI_MEMCPY (LocalTable, MappedTable, TableLength);
-ErrorExit:
+Exit:
OslUnmapTable (MappedTable);
*Table = LocalTable;
- return (AE_OK);
+ return (Status);
}
@@ -1003,7 +1003,7 @@ OslGetBiosTable (
if (TableLength == 0)
{
Status = AE_BAD_HEADER;
- goto ErrorExit;
+ goto Exit;
}
/* Copy table to local buffer and return it */
@@ -1012,16 +1012,16 @@ OslGetBiosTable (
if (!LocalTable)
{
Status = AE_NO_MEMORY;
- goto ErrorExit;
+ goto Exit;
}
ACPI_MEMCPY (LocalTable, MappedTable, TableLength);
*Address = TableAddress;
*Table = LocalTable;
-ErrorExit:
+Exit:
OslUnmapTable (MappedTable);
- return (AE_OK);
+ return (Status);
}
@@ -1290,7 +1290,7 @@ OslReadTableFromFile (
{
fprintf (stderr, "Could not read table header: %s\n", Filename);
Status = AE_BAD_HEADER;
- goto ErrorExit;
+ goto Exit;
}
/* If signature is specified, it must match the table */
@@ -1301,14 +1301,14 @@ OslReadTableFromFile (
fprintf (stderr, "Incorrect signature: Expecting %4.4s, found %4.4s\n",
Signature, Header.Signature);
Status = AE_BAD_SIGNATURE;
- goto ErrorExit;
+ goto Exit;
}
TableLength = ApGetTableLength (&Header);
if (TableLength == 0)
{
Status = AE_BAD_HEADER;
- goto ErrorExit;
+ goto Exit;
}
/* Read the entire table into a local buffer */
@@ -1320,7 +1320,7 @@ OslReadTableFromFile (
"%4.4s: Could not allocate buffer for table of length %X\n",
Header.Signature, TableLength);
Status = AE_NO_MEMORY;
- goto ErrorExit;
+ goto Exit;
}
fseek (TableFile, FileOffset, SEEK_SET);
@@ -1333,7 +1333,7 @@ OslReadTableFromFile (
fprintf (stderr, "%4.4s: Could not read table content\n",
Header.Signature);
Status = AE_INVALID_TABLE_LENGTH;
- goto ErrorExit;
+ goto Exit;
}
Total += Count;
@@ -1343,7 +1343,7 @@ OslReadTableFromFile (
(void) ApIsValidChecksum (LocalTable);
-ErrorExit:
+Exit:
fclose (TableFile);
*Table = LocalTable;
return (Status);
diff --git a/source/os_specific/service_layers/osunixdir.c b/source/os_specific/service_layers/osunixdir.c
index cd015592e02b..835eee3d0032 100644
--- a/source/os_specific/service_layers/osunixdir.c
+++ b/source/os_specific/service_layers/osunixdir.c
@@ -41,7 +41,7 @@
* POSSIBILITY OF SUCH DAMAGES.
*/
-#include <acpi.h>
+#include "acpi.h"
#include <stdio.h>
#include <stdlib.h>
diff --git a/source/os_specific/service_layers/osunixxf.c b/source/os_specific/service_layers/osunixxf.c
index 361054802485..224f345599eb 100644
--- a/source/os_specific/service_layers/osunixxf.c
+++ b/source/os_specific/service_layers/osunixxf.c
@@ -1345,7 +1345,7 @@ AcpiOsWritable (
*
* FUNCTION: AcpiOsSignal
*
- * PARAMETERS: Function - ACPI CA signal function code
+ * PARAMETERS: Function - ACPI A signal function code
* Info - Pointer to function-dependent structure
*
* RETURN: Status
diff --git a/source/os_specific/service_layers/oswintbl.c b/source/os_specific/service_layers/oswintbl.c
index daff7fe5d2c0..0afde6874f6a 100644
--- a/source/os_specific/service_layers/oswintbl.c
+++ b/source/os_specific/service_layers/oswintbl.c
@@ -222,6 +222,7 @@ AcpiOsGetTableByName (
HKEY SubKey;
ULONG i;
ACPI_TABLE_HEADER *ReturnTable;
+ ACPI_STATUS Status = AE_OK;
/*
@@ -294,7 +295,8 @@ AcpiOsGetTableByName (
{
fprintf (stderr, "Could not open %s entry: %s\n",
Signature, WindowsFormatException (WinStatus));
- return (AE_ERROR);
+ Status = AE_ERROR;
+ goto Cleanup;
}
RegCloseKey (Handle);
@@ -313,7 +315,8 @@ AcpiOsGetTableByName (
{
fprintf (stderr, "Could not get %s registry entry: %s\n",
Signature, WindowsFormatException (WinStatus));
- return (AE_ERROR);
+ Status = AE_ERROR;
+ goto Cleanup;
}
if (Type == REG_BINARY)
@@ -326,11 +329,12 @@ AcpiOsGetTableByName (
WinStatus = RegQueryValueEx (Handle, KeyBuffer, NULL, NULL,
NULL, &DataSize);
- if (WinStatus != ERROR_SUCCESS)
+ if (WinStatus = ERROR_SUCCESS)
{
fprintf (stderr, "Could not read the %s table size: %s\n",
Signature, WindowsFormatException (WinStatus));
- return (AE_ERROR);
+ Status = AE_ERROR;
+ goto Cleanup;
}
/* Allocate a new buffer for the table */
@@ -338,6 +342,7 @@ AcpiOsGetTableByName (
ReturnTable = malloc (DataSize);
if (!ReturnTable)
{
+ Status = AE_NO_MEMORY;
goto Cleanup;
}
@@ -345,20 +350,21 @@ AcpiOsGetTableByName (
WinStatus = RegQueryValueEx (Handle, KeyBuffer, NULL, NULL,
(UCHAR *) ReturnTable, &DataSize);
- if (WinStatus != ERROR_SUCCESS)
+ if (WinStatus = ERROR_SUCCESS)
{
fprintf (stderr, "Could not read %s data: %s\n",
Signature, WindowsFormatException (WinStatus));
free (ReturnTable);
- return (AE_ERROR);
+ Status = AE_ERROR;
+ goto Cleanup;
}
-Cleanup:
- RegCloseKey (Handle);
-
*Table = ReturnTable;
*Address = 0;
- return (AE_OK);
+
+Cleanup:
+ RegCloseKey (Handle);
+ return (Status);
}
diff --git a/source/os_specific/service_layers/oswinxf.c b/source/os_specific/service_layers/oswinxf.c
index ebb007edea0d..667a9f905333 100644
--- a/source/os_specific/service_layers/oswinxf.c
+++ b/source/os_specific/service_layers/oswinxf.c
@@ -1324,7 +1324,7 @@ AcpiOsWriteMemory (
*
* FUNCTION: AcpiOsSignal
*
- * PARAMETERS: Function - ACPI CA signal function code
+ * PARAMETERS: Function - ACPICA signal function code
* Info - Pointer to function-dependent structure
*
* RETURN: Status