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

For now it still relies on Aml::to_aml_bytes() for the children 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 7da69b59f7
commit 8b7bfca9b0

View File

@ -869,11 +869,10 @@ impl<'a> Store<'a> {
}
impl<'a> Aml for Store<'a> {
fn to_aml_bytes(&self) -> Vec<u8> {
let mut bytes = vec![0x70]; /* StoreOp */
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
bytes.push(0x70); /* StoreOp */
bytes.extend_from_slice(&self.value.to_aml_bytes());
bytes.extend_from_slice(&self.name.to_aml_bytes());
bytes
}
}