Makes handling & passing them around a bit more convenient. Will be used in the upcoming proxmox-post-hook utility.
Signed-off-by: Christoph Heiss <c.he...@proxmox.com> --- Changes v2 -> v3: * new patch, split out from later patch proxmox-auto-installer/src/udevinfo.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/proxmox-auto-installer/src/udevinfo.rs b/proxmox-auto-installer/src/udevinfo.rs index a6b61b5..677f3f6 100644 --- a/proxmox-auto-installer/src/udevinfo.rs +++ b/proxmox-auto-installer/src/udevinfo.rs @@ -1,9 +1,11 @@ use serde::Deserialize; use std::collections::BTreeMap; +/// Uses a BTreeMap to have the keys sorted +pub type UdevProperties = BTreeMap<String, String>; + #[derive(Clone, Deserialize, Debug)] pub struct UdevInfo { - // use BTreeMap to have keys sorted - pub disks: BTreeMap<String, BTreeMap<String, String>>, - pub nics: BTreeMap<String, BTreeMap<String, String>>, + pub disks: BTreeMap<String, UdevProperties>, + pub nics: BTreeMap<String, UdevProperties>, } -- 2.45.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel