vmm: Device name verification based on DeviceTree

Instead of relying on a PCI specific device list, we use the DeviceTree
as a reference to determine if a device name is already in use or not.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
Sebastien Boeuf
2021-03-17 13:19:24 +01:00
parent 13724dbd22
commit 62aaccee28
2 changed files with 5 additions and 5 deletions
+3
View File
@@ -51,6 +51,9 @@ impl DeviceTree {
pub fn new() -> Self {
DeviceTree(HashMap::new())
}
pub fn contains_key(&self, k: &str) -> bool {
self.0.contains_key(k)
}
pub fn get(&self, k: &str) -> Option<&DeviceNode> {
self.0.get(k)
}