mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
acpi_tables: aml: Implement Aml::append_aml_bytes() for !binary_op macro
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:
parent
9cddcc8766
commit
6172b6aac5
@ -998,12 +998,11 @@ macro_rules! binary_op {
|
||||
}
|
||||
|
||||
impl<'a> Aml for $name<'a> {
|
||||
fn to_aml_bytes(&self) -> Vec<u8> {
|
||||
let mut bytes = vec![$opcode]; /* Op for the binary operator */
|
||||
fn append_aml_bytes(&self, bytes: &mut Vec<u8>) {
|
||||
bytes.push($opcode); /* Op for the binary operator */
|
||||
bytes.extend_from_slice(&self.a.to_aml_bytes());
|
||||
bytes.extend_from_slice(&self.b.to_aml_bytes());
|
||||
bytes.extend_from_slice(&self.target.to_aml_bytes());
|
||||
bytes
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user