mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
vm-virtio: Add (temporary) number allocation for virtio-watchdog
The next available number for allocation is 35. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
0b0596ef30
commit
ae375434cd
@ -42,6 +42,7 @@ pub enum VirtioDeviceType {
|
||||
TYPE_MEM = 24,
|
||||
TYPE_FS = 26,
|
||||
TYPE_PMEM = 27,
|
||||
TYPE_WATCHDOG = 35, // Temporary until official number allocated
|
||||
TYPE_UNKNOWN = 0xFF,
|
||||
}
|
||||
|
||||
@ -61,6 +62,7 @@ impl From<u32> for VirtioDeviceType {
|
||||
24 => VirtioDeviceType::TYPE_MEM,
|
||||
26 => VirtioDeviceType::TYPE_FS,
|
||||
27 => VirtioDeviceType::TYPE_PMEM,
|
||||
35 => VirtioDeviceType::TYPE_WATCHDOG,
|
||||
_ => VirtioDeviceType::TYPE_UNKNOWN,
|
||||
}
|
||||
}
|
||||
@ -85,6 +87,7 @@ impl fmt::Display for VirtioDeviceType {
|
||||
VirtioDeviceType::TYPE_MEM => "mem",
|
||||
VirtioDeviceType::TYPE_FS => "fs",
|
||||
VirtioDeviceType::TYPE_PMEM => "pmem",
|
||||
VirtioDeviceType::TYPE_WATCHDOG => "watchdog",
|
||||
VirtioDeviceType::TYPE_UNKNOWN => "UNKNOWN",
|
||||
};
|
||||
write!(f, "{}", output)
|
||||
|
Loading…
x
Reference in New Issue
Block a user