[pve-devel] [PATCH guest-common v4 6/6] mapping: remove find_on_current_node

Dominik Csapak d.csapak at proxmox.com
Thu Jun 6 11:22:01 CEST 2024


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>
---
changes from v3:
* remove also now unneeded PVE::INotify use statement

 src/PVE/Mapping/PCI.pm | 11 -----------
 src/PVE/Mapping/USB.pm | 10 ----------
 2 files changed, 21 deletions(-)

diff --git a/src/PVE/Mapping/PCI.pm b/src/PVE/Mapping/PCI.pm
index a616f91..9875df9 100644
--- a/src/PVE/Mapping/PCI.pm
+++ b/src/PVE/Mapping/PCI.pm
@@ -9,7 +9,6 @@ use PVE::Cluster qw(
     cfs_register_file
     cfs_write_file
 );
-use PVE::INotify ();
 use PVE::JSONSchema qw(get_standard_option parse_property_string);
 use PVE::SysFSTools ();
 
@@ -218,16 +217,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..19468d8 100644
--- a/src/PVE/Mapping/USB.pm
+++ b/src/PVE/Mapping/USB.pm
@@ -9,7 +9,6 @@ use PVE::Cluster qw(
     cfs_register_file
     cfs_write_file
 );
-use PVE::INotify ();
 use PVE::JSONSchema qw(get_standard_option parse_property_string);
 use PVE::SysFSTools ();
 
@@ -155,15 +154,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) = @_;
 
-- 
2.39.2





More information about the pve-devel mailing list