[pve-devel] [PATCH pve-container] typo fixup: dettach -> detach

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Sep 2 15:10:04 CEST 2015


---
 src/PVE/LXC.pm        |  6 +++---
 src/PVE/VZDump/LXC.pm | 14 +++++++-------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/PVE/LXC.pm b/src/PVE/LXC.pm
index 0544fd1..d1e99ff 100644
--- a/src/PVE/LXC.pm
+++ b/src/PVE/LXC.pm
@@ -1287,7 +1287,7 @@ sub vm_stop_cleanup {
             my $vollist = get_vm_volumes($conf);
             my $loopdevlist = get_vm_volumes($conf, 'rootfs');
 
-	    dettach_loops($storage_cfg, $loopdevlist);
+	    detach_loops($storage_cfg, $loopdevlist);
 	    PVE::Storage::deactivate_volumes($storage_cfg, $vollist);
 	}
     };
@@ -1923,7 +1923,7 @@ sub attach_loops {
     return $loopdevs;
 }
 
-sub dettach_loops {
+sub detach_loops {
     my ($storage_cfg, $vollist, $snapname) = @_;
 
     my $loopdevs = loopdevices_list();
@@ -1977,7 +1977,7 @@ sub umount_all {
 	}
     });
 
-    PVE::LXC::dettach_loops($storage_cfg, $volid_list);
+    PVE::LXC::detach_loops($storage_cfg, $volid_list);
 }
 
 sub mount_all {
diff --git a/src/PVE/VZDump/LXC.pm b/src/PVE/VZDump/LXC.pm
index 3265cbb..9cf2914 100644
--- a/src/PVE/VZDump/LXC.pm
+++ b/src/PVE/VZDump/LXC.pm
@@ -121,7 +121,7 @@ sub prepare {
 	mkpath $mountpoint;
 	&$check_mountpoint_empty($mountpoint);
 
-	$task->{cleanup}->{dettach_loops} = $volid_list;
+	$task->{cleanup}->{detach_loops} = $volid_list;
 	my $loopdevs = PVE::LXC::attach_loops($self->{storecfg}, $volid_list);
 	my $mp = { volume => $diskinfo->{volid}, mp => "/" };
 	PVE::LXC::mountpoint_mount($mp, $mountpoint, $self->{storecfg}, $loopdevs);
@@ -168,7 +168,7 @@ sub snapshot {
     # my $volid_list = PVE::LXC::get_vm_volumes($snapconf);
     my $volid_list = [$diskinfo->{volid}];
 
-    $task->{cleanup}->{dettach_loops} = $volid_list;
+    $task->{cleanup}->{detach_loops} = $volid_list;
     my $loopdevs = PVE::LXC::attach_loops($self->{storecfg}, $volid_list, 'vzdump');
 
     my $mountpoint = $default_mount_point;
@@ -284,15 +284,15 @@ sub cleanup {
 	PVE::Tools::run_command(['umount', '-l', '-d', $mountpoint]);
     };
 
-    if (my $volid_list = $task->{cleanup}->{dettach_vzdump_snapshot_loops}) {
-	PVE::LXC::dettach_loops($self->{storecfg}, $volid_list, 'vzdump');
+    if (my $volid_list = $task->{cleanup}->{detach_vzdump_snapshot_loops}) {
+	PVE::LXC::detach_loops($self->{storecfg}, $volid_list, 'vzdump');
     }
 
-    if (my $volid_list = $task->{cleanup}->{dettach_loops}) {
+    if (my $volid_list = $task->{cleanup}->{detach_loops}) {
 	if ($task->{cleanup}->{remove_snapshot}) {
-	    PVE::LXC::dettach_loops($self->{storecfg}, $volid_list, 'vzdump');
+	    PVE::LXC::detach_loops($self->{storecfg}, $volid_list, 'vzdump');
 	} else {
-	    PVE::LXC::dettach_loops($self->{storecfg}, $volid_list);
+	    PVE::LXC::detach_loops($self->{storecfg}, $volid_list);
 	}
     }
 
-- 
2.1.4





More information about the pve-devel mailing list