[pve-devel] r5164 - in qemu-server/pve2: . PVE

svn-commits at proxmox.com svn-commits at proxmox.com
Thu Sep 16 14:13:05 CEST 2010


Author: dietmar
Date: 2010-09-16 12:13:05 +0000 (Thu, 16 Sep 2010)
New Revision: 5164

Modified:
   qemu-server/pve2/ChangeLog
   qemu-server/pve2/PVE/QemuServer.pm
Log:
* PVE/QemuServer.pm (disknames): removed - no longer needed



Modified: qemu-server/pve2/ChangeLog
===================================================================
--- qemu-server/pve2/ChangeLog	2010-09-16 11:45:00 UTC (rev 5163)
+++ qemu-server/pve2/ChangeLog	2010-09-16 12:13:05 UTC (rev 5164)
@@ -1,5 +1,7 @@
 2010-09-16  Proxmox Support Team  <support at proxmox.com>
 
+	* PVE/QemuServer.pm (disknames): removed - no longer needed
+
 	* PVE/QemuServer.pm (parse_options_new): removed - no longer needed
 
 2010-09-14  Proxmox Support Team  <support at proxmox.com>

Modified: qemu-server/pve2/PVE/QemuServer.pm
===================================================================
--- qemu-server/pve2/PVE/QemuServer.pm	2010-09-16 11:45:00 UTC (rev 5163)
+++ qemu-server/pve2/PVE/QemuServer.pm	2010-09-16 12:13:05 UTC (rev 5164)
@@ -505,13 +505,6 @@
 
 }
 
-sub disknames {
-    # order is important - used to autoselect boot disk
-    return ((map { "ide$_" } (0 .. ($MAX_IDE_DISKS - 1))),  
-	    (map { "scsi$_" } (0 .. ($MAX_SCSI_DISKS - 1))),
-	    (map { "virtio$_" } (0 .. ($MAX_VIRTIO_DISKS - 1))));
-}
-
 sub valid_drivename {
     my $dev = shift;
 
@@ -1247,14 +1240,13 @@
 sub load_diskinfo {
     my ($storecfg, $vmid, $conf) = @_;
 
-    my @disks = disknames();
-
     my $info = {};
     my $res = {};
     my $vollist;
-    foreach my $ds (@disks) {
-	next if !$conf->{$ds};
 
+    foreach my $ds (keys %$conf) {
+	next if !valid_drivename($ds);
+
 	my $di = parse_drive ($ds, $conf->{$ds});
 	next if !$di;
 




More information about the pve-devel mailing list