diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2011-04-13 18:18:52 +0000 | 
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2011-04-13 18:18:52 +0000 | 
| commit | 997de4e17cf02a81027df8d01a4fcefe25da3796 (patch) | |
| tree | f5abd67cc9e3ada1ae289fe7cf2e23d9abf07fcc /compiler/dtutils.c | |
| parent | 4d8fe534b7309d798d941e14e51985eed6b511bc (diff) | |
Diffstat (limited to 'compiler/dtutils.c')
| -rw-r--r-- | compiler/dtutils.c | 38 | 
1 files changed, 19 insertions, 19 deletions
diff --git a/compiler/dtutils.c b/compiler/dtutils.c index 321ec9343ac6a..a733046df7440 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);  | 
