]> git.proxmox.com Git - pve-guest-common.git/commit
add PCI/USB Mapping configs
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 6 Jun 2023 13:52:01 +0000 (15:52 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 7 Jun 2023 17:14:38 +0000 (19:14 +0200)
commit11fa95682eed43e7aa89c0e70769fe6e177327eb
treead6597d439685a86d28494e69f57fcc6ead37636
parentaabf879e0c1e5769608e6a028e0b3022f8f6b4e7
add PCI/USB Mapping configs

adds a config file for each type of resource (usb/pci) by using a 'map'
array propertystring for each node mapping

in each mapping we save the path(s) and some other information to detect
hardware changes (if possible) like the vendor/device id

both configs have custom header parser/formatter to omit the type (since
we only want one type per config here)

also each config has some helpers like find_on_current_node

the resulting config (e.g. for pci) would look like this:
src/Makefile
src/PVE/Mapping/PCI.pm [new file with mode: 0644]
src/PVE/Mapping/USB.pm [new file with mode: 0644]