Update interface to AcpiUtValidAcpiName.

Clean up the interface by making the input argument a char * string
instead of a UINT32 name. This is easier to use for all callers
and eliminates casting to *(UINT32*)
This commit is contained in:
Robert Moore 2013-05-02 12:03:50 -07:00
parent fad0d289af
commit 02fe96717e
6 changed files with 9 additions and 8 deletions

View File

@ -743,7 +743,7 @@ AcpiDbIntegrityWalk (
return (AE_OK);
}
if (!AcpiUtValidAcpiName (Node->Name.Integer))
if (!AcpiUtValidAcpiName (Node->Name.Ascii))
{
AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
return (AE_OK);

View File

@ -232,7 +232,7 @@ AcpiTbAddTable (
ACPI_BIOS_ERROR ((AE_INFO,
"Table has invalid signature [%4.4s] (0x%8.8X), "
"must be SSDT or OEMx",
AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ?
AcpiUtValidAcpiName (TableDesc->Pointer->Signature) ?
TableDesc->Pointer->Signature : "????",
*(UINT32 *) TableDesc->Pointer->Signature));

View File

@ -613,7 +613,8 @@ AcpiUtValidAcpiChar (
*
* FUNCTION: AcpiUtValidAcpiName
*
* PARAMETERS: Name - The name to be examined
* PARAMETERS: Name - The name to be examined. Does not have to
* be NULL terminated string.
*
* RETURN: TRUE if the name is valid, FALSE otherwise
*
@ -626,7 +627,7 @@ AcpiUtValidAcpiChar (
BOOLEAN
AcpiUtValidAcpiName (
UINT32 Name)
char *Name)
{
UINT32 i;
@ -636,7 +637,7 @@ AcpiUtValidAcpiName (
for (i = 0; i < ACPI_NAME_SIZE; i++)
{
if (!AcpiUtValidAcpiChar ((ACPI_CAST_PTR (char, &Name))[i], i))
if (!AcpiUtValidAcpiChar (Name[i], i))
{
return (FALSE);
}

View File

@ -983,7 +983,7 @@ UtConvertBackslashes (
BOOLEAN
AcpiUtValidAcpiName (
UINT32 Name);
char *Name);
BOOLEAN
AcpiUtValidAcpiChar (

View File

@ -234,7 +234,7 @@ AbValidateHeader (
ACPI_TABLE_HEADER *Header)
{
if (!AcpiUtValidAcpiName (* (UINT32 *) &Header->Signature))
if (!AcpiUtValidAcpiName (Header->Signature))
{
printf ("Header signature is invalid\n");
return (FALSE);

View File

@ -147,7 +147,7 @@ ApIsValidHeader (
/* Make sure signature is all ASCII and a valid ACPI name */
if (!AcpiUtValidAcpiName (*(UINT32 *) Table->Signature))
if (!AcpiUtValidAcpiName (Table->Signature))
{
fprintf (stderr, "Table signature (0x%X) is invalid\n",
*(UINT32 *) Table->Signature);