[pve-devel] [RFC pve-storage 32/36] plugin: nfs: make helper subroutines private

Max Carrara m.carrara at proxmox.com
Wed Jul 17 11:40:30 CEST 2024


The `nfs_is_mounted` and `nfs_mount` subroutines are not part of any
(official) public interface / API, nor are they used anywhere in our
code, so make them private to prevent haphazard use.

Signed-off-by: Max Carrara <m.carrara at proxmox.com>
---
 src/PVE/Storage/NFSPlugin.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/PVE/Storage/NFSPlugin.pm b/src/PVE/Storage/NFSPlugin.pm
index 0d02b49..6dbf8b4 100644
--- a/src/PVE/Storage/NFSPlugin.pm
+++ b/src/PVE/Storage/NFSPlugin.pm
@@ -23,7 +23,7 @@ use base qw(PVE::Storage::Plugin);
 
 # NFS helper functions
 
-sub nfs_is_mounted {
+my sub nfs_is_mounted {
     my ($server, $export, $mountpoint, $mountdata) = @_;
 
     $server = "[$server]" if Net::IP::ip_is_ipv6($server);
@@ -38,7 +38,7 @@ sub nfs_is_mounted {
     return undef;
 }
 
-sub nfs_mount {
+my sub nfs_mount {
     my ($server, $export, $mountpoint, $options) = @_;
 
     $server = "[$server]" if Net::IP::ip_is_ipv6($server);
-- 
2.39.2





More information about the pve-devel mailing list