acpi_tables: aml: Implement Aml::append_aml_bytes() for Return

For now it still relies on Aml::to_aml_bytes() for the child as not all
structures have been ported.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2021-11-03 14:29:05 +00:00
parent 1a35d5a017
commit bfd3deac7c

View File

@ -646,10 +646,9 @@ impl<'a> Return<'a> {
}
impl<'a> Aml for Return<'a> {
fn to_aml_bytes(&self) -> Vec<u8> {
let mut bytes = vec![0xa4]; /* ReturnOp */
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
bytes.push(0xa4); /* ReturnOp */
bytes.append(&mut self.value.to_aml_bytes());
bytes
}
}