diff options
author | jkim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
commit | 8e9a373708032aaf58694e237e3889d7d3fd796f (patch) | |
tree | e05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/compiler/dttemplate.c | |
parent | 7aca7201724cb02a2a0541bd3ad2c0aca23dd076 (diff) | |
download | FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.zip FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.tar.gz |
Import ACPICA 20130725.
Diffstat (limited to 'source/compiler/dttemplate.c')
-rw-r--r-- | source/compiler/dttemplate.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/source/compiler/dttemplate.c b/source/compiler/dttemplate.c index 09e9990..7370855 100644 --- a/source/compiler/dttemplate.c +++ b/source/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); } |