[pve-devel] [PATCH guest-common v3 4/4] mapping: remove find_on_current_node

Fiona Ebner f.ebner at proxmox.com
Fri May 31 14:09:04 CEST 2024


Am 19.04.24 um 14:45 schrieb Dominik Csapak:
> they only have one user each (where we can inline the implementation).
> It's easy enough to recreate should we need to.
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PVE/Mapping/PCI.pm | 10 ----------
>  src/PVE/Mapping/USB.pm |  9 ---------
>  2 files changed, 19 deletions(-)
> 
> diff --git a/src/PVE/Mapping/PCI.pm b/src/PVE/Mapping/PCI.pm
> index b525c07..9c2b8b2 100644
> --- a/src/PVE/Mapping/PCI.pm
> +++ b/src/PVE/Mapping/PCI.pm
> @@ -214,16 +214,6 @@ sub write_pci_config {
>      cfs_write_file($FILENAME, $cfg);
>  }
>  
> -sub find_on_current_node {
> -    my ($id) = @_;
> -
> -    my $cfg = PVE::Mapping::PCI::config();
> -    my $node = PVE::INotify::nodename();
> -
> -    # ignore errors
> -    return get_node_mapping($cfg, $id, $node);
> -}
> -
>  sub get_node_mapping {
>      my ($cfg, $id, $nodename) = @_;
>  
> diff --git a/src/PVE/Mapping/USB.pm b/src/PVE/Mapping/USB.pm
> index 34bc3cb..6dd15c4 100644
> --- a/src/PVE/Mapping/USB.pm
> +++ b/src/PVE/Mapping/USB.pm
> @@ -155,15 +155,6 @@ sub write_usb_config {
>      cfs_write_file($FILENAME, $cfg);
>  }
>  
> -sub find_on_current_node {
> -    my ($id) = @_;
> -
> -    my $cfg = config();
> -    my $node = PVE::INotify::nodename();
> -
> -    return get_node_mapping($cfg, $id, $node);
> -}
> -
>  sub get_node_mapping {
>      my ($cfg, $id, $nodename) = @_;
>  

Seems like the use PVE::INotify; statements can be dropped too now.




More information about the pve-devel mailing list