mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
acpi_tables: aml: Implement Aml::append_aml_bytes() for constants
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
211ee1521d
commit
f917198f27
@ -21,8 +21,8 @@ pub const ZERO: Zero = Zero {};
|
|||||||
pub struct Zero {}
|
pub struct Zero {}
|
||||||
|
|
||||||
impl Aml for Zero {
|
impl Aml for Zero {
|
||||||
fn to_aml_bytes(&self) -> Vec<u8> {
|
fn append_aml_bytes(&self, v: &mut Vec<u8>) {
|
||||||
vec![0u8]
|
v.push(0u8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,8 +30,8 @@ pub const ONE: One = One {};
|
|||||||
pub struct One {}
|
pub struct One {}
|
||||||
|
|
||||||
impl Aml for One {
|
impl Aml for One {
|
||||||
fn to_aml_bytes(&self) -> Vec<u8> {
|
fn append_aml_bytes(&self, v: &mut Vec<u8>) {
|
||||||
vec![1u8]
|
v.push(1u8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,8 +39,8 @@ pub const ONES: Ones = Ones {};
|
|||||||
pub struct Ones {}
|
pub struct Ones {}
|
||||||
|
|
||||||
impl Aml for Ones {
|
impl Aml for Ones {
|
||||||
fn to_aml_bytes(&self) -> Vec<u8> {
|
fn append_aml_bytes(&self, v: &mut Vec<u8>) {
|
||||||
vec![0xffu8]
|
v.push(0xffu8)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user