mirror of
https://github.com/acpica/acpica/
synced 2025-02-25 18:04:08 +03:00
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:
parent
fad0d289af
commit
02fe96717e
@ -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);
|
||||
|
@ -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));
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -983,7 +983,7 @@ UtConvertBackslashes (
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiName (
|
||||
UINT32 Name);
|
||||
char *Name);
|
||||
|
||||
BOOLEAN
|
||||
AcpiUtValidAcpiChar (
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user