[pve-devel] [RFC pve-storage 02/36] plugin: btrfs: make plugin-specific helpers private

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


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

diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index 42815cb..a503404 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -156,7 +156,7 @@ sub update_volume_attribute {
 }
 
 # croak would not include the caller from within this module
-sub __error {
+my sub __error {
     my ($msg) = @_;
     my (undef, $f, $n) = caller(1);
     die "$msg at $f: $n\n";
@@ -164,7 +164,7 @@ sub __error {
 
 # Given a name (eg. `vm-VMID-disk-ID.raw`), take the part up to the format suffix as the name of
 # the subdirectory (subvolume).
-sub raw_name_to_dir($) {
+my sub raw_name_to_dir($) {
     my ($raw) = @_;
 
     # For the subvolume directory Strip the `.<format>` suffix:
@@ -175,7 +175,7 @@ sub raw_name_to_dir($) {
     __error "internal error: bad disk name: $raw";
 }
 
-sub raw_file_to_subvol($) {
+my sub raw_file_to_subvol($) {
     my ($file) = @_;
 
     if ($file =~ m|^(.*)/disk\.raw$|) {
-- 
2.39.2





More information about the pve-devel mailing list