summaryrefslogtreecommitdiff
path: root/compiler/dtutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/dtutils.c')
-rw-r--r--compiler/dtutils.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/compiler/dtutils.c b/compiler/dtutils.c
index 321ec9343ac6..a733046df744 100644
--- a/compiler/dtutils.c
+++ b/compiler/dtutils.c
@@ -189,8 +189,16 @@ DtFatal (
DtError (ASL_ERROR, MessageId, FieldObject, ExtraMessage);
+/*
+ * TBD: remove this entire function, DtFatal
+ *
+ * We cannot abort the compiler on error, because we may be compiling a
+ * list of files. We must move on to the next file.
+ */
+#ifdef __OBSOLETE
CmCleanupAndExit ();
exit (1);
+#endif
}
@@ -316,7 +324,6 @@ DtGetFileSize (
* FUNCTION: DtGetFieldValue
*
* PARAMETERS: Field - Current field list pointer
- * Name - Field name
*
* RETURN: Field value
*
@@ -326,23 +333,14 @@ DtGetFileSize (
char *
DtGetFieldValue (
- DT_FIELD *Field,
- char *Name)
+ DT_FIELD *Field)
{
-
- /* Search the field list for the name */
-
- while (Field)
+ if (!Field)
{
- if (!ACPI_STRCMP (Name, Field->Name))
- {
- return (Field->Value);
- }
-
- Field = Field->Next;
+ return (NULL);
}
- return (NULL);
+ return (Field->Value);
}
@@ -479,7 +477,7 @@ DtGetBufferLength (
*
* FUNCTION: DtGetFieldLength
*
- * PARAMETERS: Field - Current field list pointer
+ * PARAMETERS: Field - Current field
* Info - Data table info
*
* RETURN: Field length
@@ -567,7 +565,7 @@ DtGetFieldLength (
break;
case ACPI_DMT_STRING:
- Value = DtGetFieldValue (Field, Info->Name);
+ Value = DtGetFieldValue (Field);
if (Value)
{
ByteLength = ACPI_STRLEN (Value) + 1;
@@ -577,6 +575,7 @@ DtGetFieldLength (
sprintf (MsgBuffer, "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
+ return (0);
}
break;
@@ -589,7 +588,7 @@ DtGetFieldLength (
break;
case ACPI_DMT_BUFFER:
- Value = DtGetFieldValue (Field, Info->Name);
+ Value = DtGetFieldValue (Field);
if (Value)
{
ByteLength = DtGetBufferLength (Value);
@@ -599,6 +598,7 @@ DtGetFieldLength (
sprintf (MsgBuffer, "Expected \"%s\"", Info->Name);
DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer);
+ return (0);
}
break;
@@ -612,7 +612,7 @@ DtGetFieldLength (
break;
case ACPI_DMT_UNICODE:
- Value = DtGetFieldValue (Field, Info->Name);
+ Value = DtGetFieldValue (Field);
/* TBD: error if Value is NULL? (as below?) */
@@ -621,7 +621,7 @@ DtGetFieldLength (
default:
DtFatal (ASL_MSG_COMPILER_INTERNAL, Field, "Invalid table opcode");
- break;
+ return (0);
}
return (ByteLength);