mirror of
https://github.com/acpica/acpica/
synced 2024-12-30 22:24:45 +03:00
Interpreter: Fix Store() when implicit conversion is not possible
For the cases such as a store of a string to an existing package object, implement the store as a CopyObject(). This is a small departure from the ACPI specification which states that the control method should be aborted in this case. However, ASLTS suite depends on this behavior.
This commit is contained in:
parent
aa3b6824ac
commit
d7d9d66bf6
@ -587,13 +587,28 @@ AcpiExStoreObjectToNode (
|
||||
default:
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
|
||||
"Storing %s (%p) directly into node (%p) with no implicit conversion\n",
|
||||
AcpiUtGetObjectTypeName (SourceDesc), SourceDesc, Node));
|
||||
"Storing [%s] (%p) directly into node [%s] (%p)"
|
||||
" with no implicit conversion\n",
|
||||
AcpiUtGetObjectTypeName (SourceDesc), SourceDesc,
|
||||
AcpiUtGetObjectTypeName (TargetDesc), Node));
|
||||
|
||||
/* No conversions for all other types. Just attach the source object */
|
||||
/*
|
||||
* No conversions for all other types. Directly store a copy of
|
||||
* the source object. NOTE: This is a departure from the ACPI
|
||||
* spec, which states "If conversion is impossible, abort the
|
||||
* running control method".
|
||||
*
|
||||
* This code implements "If conversion is impossible, treat the
|
||||
* Store operation as a CopyObject".
|
||||
*/
|
||||
Status = AcpiUtCopyIobjectToIobject (SourceDesc, &NewDesc, WalkState);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Status = AcpiNsAttachObject (Node, SourceDesc,
|
||||
SourceDesc->Common.Type);
|
||||
Status = AcpiNsAttachObject (Node, NewDesc, NewDesc->Common.Type);
|
||||
AcpiUtRemoveReference (NewDesc);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user