[pve-devel] [PATCH guest-common 2/2] mapping: pci: optionally return the config in 'find_on_current_node'

Dominik Csapak d.csapak at proxmox.com
Tue Apr 2 11:32:40 CEST 2024


On 3/22/24 14:38, Fiona Ebner wrote:
> Am 18.03.24 um 12:18 schrieb Dominik Csapak:
>> this is useful to get to the config without having to parse it again
>>
> 
> You could also adapt the call sites that need it to use
> PVE::Mapping::PCI::config() and PVE::Mapping::PCI::get_node_mapping()
> instead of PVE::Mapping::PCI::find_on_current_node().
> 
> That would avoid overloading the return value. IMHO
> find_on_current_node() doesn't sound like it should return the full map
> config, even if just optionally.

yes that's a better idea.... as it stands we only use the 'find_on_current_node'
call only once anyway, so when we move the implementation to the current call
site, we could remove it here (if we'd ever need it again, it should
be trivial to introduce it then)




More information about the pve-devel mailing list