mirror of
https://github.com/acpica/acpica/
synced 2025-02-02 06:35:34 +03:00
Fix for extraneous debug message for packages.
Fixed a problem where an extraneous debug message was produced for package objects (when debugging enabled). The message "Package List length larger than NumElements count" is now produced in the correct case, and is also an error message rather than a debug message. Added a debug message for the opposite case, where NumElements is larger than the Package List, and the package has been padded out with NULL elements.
This commit is contained in:
parent
3a7f6dfeed
commit
c0a8fa9ae4
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: dsobject - Dispatcher object management routines
|
||||
* $Revision: 1.139 $
|
||||
* $Revision: 1.140 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -564,11 +564,40 @@ AcpiDsBuildInternalPackageObj (
|
||||
Arg = Arg->Common.Next;
|
||||
}
|
||||
|
||||
if (!Arg)
|
||||
/* Check for match between NumElements and actual length of PackageList */
|
||||
|
||||
if (Arg)
|
||||
{
|
||||
/*
|
||||
* NumElements was exhausted, but there are remaining elements in the
|
||||
* PackageList.
|
||||
*
|
||||
* Note: technically, this is an error, from ACPI spec: "It is an error
|
||||
* for NumElements to be less than the number of elements in the
|
||||
* PackageList". However, for now, we just print an error message and
|
||||
* no exception is returned.
|
||||
*/
|
||||
while (Arg)
|
||||
{
|
||||
/* Find out how many elements there really are */
|
||||
|
||||
i++;
|
||||
Arg = Arg->Common.Next;
|
||||
}
|
||||
|
||||
ACPI_ERROR ((AE_INFO,
|
||||
"Package List length (%X) larger than NumElements count (%X), truncated\n",
|
||||
i, ElementCount));
|
||||
}
|
||||
else if (i < ElementCount)
|
||||
{
|
||||
/*
|
||||
* Arg list (elements) was exhausted, but we did not reach NumElements count.
|
||||
* Note: this is not an error, the package is padded out with NULLs.
|
||||
*/
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
|
||||
"Package List length larger than NumElements count (%X), truncated\n",
|
||||
ElementCount));
|
||||
"Package List length (%X) smaller than NumElements count (%X), padded with null elements\n",
|
||||
i, ElementCount));
|
||||
}
|
||||
|
||||
ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user