[pve-devel] [PATCH] remove old subs no more used

Alexandre Derumier aderumier at odiso.com
Sat Jul 28 10:46:56 CEST 2012


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |   39 ---------------------------------------
 1 files changed, 0 insertions(+), 39 deletions(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index af03bf4..fafc211 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -660,45 +660,6 @@ sub os_list_description {
     };
 }
 
-sub disk_devive_info {
-    my $dev = shift;
-
-    die "unknown disk device format '$dev'" if $dev !~ m/^(ide|scsi|virtio)(\d+)$/;
-
-    my $bus = $1;
-    my $index = $2;
-    my $maxdev = 1024;
-
-    if ($bus eq 'ide') {
-	$maxdev = 2;
-    } elsif ($bus eq 'scsi') {
-	$maxdev = 7;
-    }
-
-    my $controller = int($index / $maxdev);
-    my $unit = $index % $maxdev;
-
-
-    return { bus => $bus, desc => uc($bus) . " $controller:$unit",
-	     controller => $controller, unit => $unit, index => $index };
-
-}
-
-sub qemu_drive_name {
-    my ($dev, $media) = @_;
-
-    my $info = disk_devive_info($dev);
-    my $mediastr = '';
-
-    if (($info->{bus} eq 'ide') || ($info->{bus} eq 'scsi')) {
-	$mediastr = ($media eq 'cdrom') ? "-cd" : "-hd";
-	return sprintf("%s%i%s%i", $info->{bus}, $info->{controller},
-		       $mediastr, $info->{unit});
-    } else {
-	return sprintf("%s%i", $info->{bus}, $info->{index});
-    }
-}
-
 my $cdrom_path;
 
 sub get_cdrom_path {
-- 
1.7.2.5




More information about the pve-devel mailing list