mirror of
https://github.com/acpica/acpica/
synced 2025-02-24 17:34:43 +03:00
Merge pull request #504 from SchmErik/dt-label
iASL: DT: detect invalid field labels
This commit is contained in:
commit
e32cc0a3e5
@ -410,7 +410,7 @@ AcpiDmDumpStao (
|
|||||||
Namepath = ACPI_ADD_PTR (char, Table, Offset);
|
Namepath = ACPI_ADD_PTR (char, Table, Offset);
|
||||||
StringLength = strlen (Namepath) + 1;
|
StringLength = strlen (Namepath) + 1;
|
||||||
|
|
||||||
AcpiDmLineHeader (Offset, StringLength, "Namestring");
|
AcpiDmLineHeader (Offset, StringLength, "Namepath");
|
||||||
AcpiOsPrintf ("\"%s\"\n", Namepath);
|
AcpiOsPrintf ("\"%s\"\n", Namepath);
|
||||||
|
|
||||||
/* Point to next namepath */
|
/* Point to next namepath */
|
||||||
|
@ -387,7 +387,8 @@ const char *AslTableCompilerMsgs [] =
|
|||||||
/* ASL_MSG_UNKNOWN_LABEL */ "Label is undefined",
|
/* ASL_MSG_UNKNOWN_LABEL */ "Label is undefined",
|
||||||
/* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type",
|
/* ASL_MSG_UNKNOWN_SUBTABLE */ "Unknown subtable type",
|
||||||
/* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature",
|
/* ASL_MSG_UNKNOWN_TABLE */ "Unknown ACPI table signature",
|
||||||
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero"
|
/* ASL_MSG_ZERO_VALUE */ "Value must be non-zero",
|
||||||
|
/* ASL_MSG_INVALID_LABEL */ "Invalid field label detected"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Preprocessor */
|
/* Preprocessor */
|
||||||
|
@ -387,6 +387,7 @@ typedef enum
|
|||||||
ASL_MSG_UNKNOWN_SUBTABLE,
|
ASL_MSG_UNKNOWN_SUBTABLE,
|
||||||
ASL_MSG_UNKNOWN_TABLE,
|
ASL_MSG_UNKNOWN_TABLE,
|
||||||
ASL_MSG_ZERO_VALUE,
|
ASL_MSG_ZERO_VALUE,
|
||||||
|
ASL_MSG_INVALID_LABEL,
|
||||||
|
|
||||||
/* These messages are used by the Preprocessor only */
|
/* These messages are used by the Preprocessor only */
|
||||||
|
|
||||||
|
@ -646,6 +646,14 @@ DtCompileTable (
|
|||||||
FieldType = DtGetFieldType (Info);
|
FieldType = DtGetFieldType (Info);
|
||||||
AslGbl_InputFieldCount++;
|
AslGbl_InputFieldCount++;
|
||||||
|
|
||||||
|
if (FieldType != DT_FIELD_TYPE_INLINE_SUBTABLE &&
|
||||||
|
strcmp (Info->Name, LocalField->Name))
|
||||||
|
{
|
||||||
|
sprintf (AslGbl_MsgBuffer, "found \"%s\" expected \"%s\"",
|
||||||
|
LocalField->Name, Info->Name);
|
||||||
|
DtError (ASL_ERROR, ASL_MSG_INVALID_LABEL, LocalField, AslGbl_MsgBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
switch (FieldType)
|
switch (FieldType)
|
||||||
{
|
{
|
||||||
case DT_FIELD_TYPE_FLAGS_INTEGER:
|
case DT_FIELD_TYPE_FLAGS_INTEGER:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user