diff options
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/dttemplate.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/dttemplate.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.c b/sys/contrib/dev/acpica/compiler/dttemplate.c index c0ff98b..ca66d16 100644 --- a/sys/contrib/dev/acpica/compiler/dttemplate.c +++ b/sys/contrib/dev/acpica/compiler/dttemplate.c @@ -117,13 +117,21 @@ DtCreateTemplates ( AslInitializeGlobals (); - AcpiUtStrupr (Signature); - /* Create all known templates if requested */ + /* Default (no signature) is DSDT */ + + if (!Signature) + { + Signature = "DSDT"; + goto GetTemplate; + } - if (!ACPI_STRNCMP (Signature, "ALL", 3) || + AcpiUtStrupr (Signature); + if (!ACPI_STRCMP (Signature, "ALL") || !ACPI_STRCMP (Signature, "*")) { + /* Create all available/known templates */ + Status = DtCreateAllTemplates (); return (Status); } @@ -136,7 +144,9 @@ DtCreateTemplates ( */ if (strlen (Signature) != ACPI_NAME_SIZE) { - fprintf (stderr, "%s, Invalid ACPI table signature\n", Signature); + fprintf (stderr, + "%s: Invalid ACPI table signature (length must be 4 characters)\n", + Signature); return (AE_ERROR); } @@ -153,19 +163,20 @@ DtCreateTemplates ( Signature = "FACP"; } +GetTemplate: TableData = AcpiDmGetTableData (Signature); if (TableData) { if (!TableData->Template) { - fprintf (stderr, "%4.4s, No template available\n", Signature); + fprintf (stderr, "%4.4s: No template available\n", Signature); return (AE_ERROR); } } else if (!AcpiUtIsSpecialTable (Signature)) { fprintf (stderr, - "%4.4s, Unrecognized ACPI table signature\n", Signature); + "%4.4s: Unrecognized ACPI table signature\n", Signature); return (AE_ERROR); } |