summaryrefslogtreecommitdiff
path: root/source/components/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/utilities')
-rw-r--r--source/components/utilities/utdecode.c22
-rw-r--r--source/components/utilities/utfileio.c7
-rw-r--r--source/components/utilities/utmutex.c24
3 files changed, 49 insertions, 4 deletions
diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c
index 849a1bc5984f..fc21e205845b 100644
--- a/source/components/utilities/utdecode.c
+++ b/source/components/utilities/utdecode.c
@@ -261,13 +261,29 @@ char *
AcpiUtGetObjectTypeName (
ACPI_OPERAND_OBJECT *ObjDesc)
{
+ ACPI_FUNCTION_TRACE (UtGetObjectTypeName);
+
if (!ObjDesc)
{
- return ("[NULL Object Descriptor]");
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Null Object Descriptor\n"));
+ return_PTR ("[NULL Object Descriptor]");
+ }
+
+ /* These descriptor types share a common area */
+
+ if ((ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_OPERAND) &&
+ (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) != ACPI_DESC_TYPE_NAMED))
+ {
+ ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+ "Invalid object descriptor type: 0x%2.2X [%s] (%p)\n",
+ ACPI_GET_DESCRIPTOR_TYPE (ObjDesc),
+ AcpiUtGetDescriptorName (ObjDesc), ObjDesc));
+
+ return_PTR ("Invalid object");
}
- return (AcpiUtGetTypeName (ObjDesc->Common.Type));
+ return_PTR (AcpiUtGetTypeName (ObjDesc->Common.Type));
}
@@ -461,8 +477,6 @@ static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] =
"ACPI_MTX_Events",
"ACPI_MTX_Caches",
"ACPI_MTX_Memory",
- "ACPI_MTX_CommandComplete",
- "ACPI_MTX_CommandReady"
};
char *
diff --git a/source/components/utilities/utfileio.c b/source/components/utilities/utfileio.c
index 0180efea08bb..8c503543507e 100644
--- a/source/components/utilities/utfileio.c
+++ b/source/components/utilities/utfileio.c
@@ -45,6 +45,7 @@
#include "accommon.h"
#include "actables.h"
#include "acapps.h"
+#include "errno.h"
#ifdef ACPI_ASL_COMPILER
#include "aslcompiler.h"
@@ -330,6 +331,12 @@ AcpiUtReadTableFromFile (
if (!File)
{
perror ("Could not open input file");
+
+ if (errno == ENOENT)
+ {
+ return (AE_NOT_EXIST);
+ }
+
return (Status);
}
diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c
index 4fe866e34ddb..60b94c11e52b 100644
--- a/source/components/utilities/utmutex.c
+++ b/source/components/utilities/utmutex.c
@@ -124,6 +124,24 @@ AcpiUtMutexInitialize (
/* Create the reader/writer lock for namespace access */
Status = AcpiUtCreateRwLock (&AcpiGbl_NamespaceRwLock);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+#ifdef ACPI_DEBUGGER
+
+ /* Debugger Support */
+
+ Status = AcpiOsCreateMutex (&AcpiGbl_DbCommandReady);
+ if (ACPI_FAILURE (Status))
+ {
+ return_ACPI_STATUS (Status);
+ }
+
+ Status = AcpiOsCreateMutex (&AcpiGbl_DbCommandComplete);
+#endif
+
return_ACPI_STATUS (Status);
}
@@ -169,6 +187,12 @@ AcpiUtMutexTerminate (
/* Delete the reader/writer lock */
AcpiUtDeleteRwLock (&AcpiGbl_NamespaceRwLock);
+
+#ifdef ACPI_DEBUGGER
+ AcpiOsDeleteMutex (AcpiGbl_DbCommandReady);
+ AcpiOsDeleteMutex (AcpiGbl_DbCommandComplete);
+#endif
+
return_VOID;
}