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

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 24fd54401d
commit d2319124f5

View File

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