[pve-devel] [PATCH 1/8] rename scsicontroller deviceid from scsi0/1 to lsi0/1

Derumier Alexandre aderumier at odiso.com
Fri Jan 20 11:42:02 CET 2012


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

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index fd720d2..e3c6c28 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -892,7 +892,7 @@ sub print_drivedevice_full {
               }
          }
 
-	$device = "scsi-$devicetype,bus=scsi$controller.0,scsi-id=$unit,drive=drive-$drive->{interface}$drive->{index},id=device-$drive->{interface}$drive->{index}";
+	$device = "scsi-$devicetype,bus=lsi$controller.0,scsi-id=$unit,drive=drive-$drive->{interface}$drive->{index},id=device-$drive->{interface}$drive->{index}";
     } elsif ($drive->{interface} eq 'ide'){
 	$maxdev = 2;
 	my $controller = int($drive->{index} / $maxdev);
@@ -2141,8 +2141,8 @@ sub config_to_command {
         if ($drive->{interface} eq 'scsi') {
            my $maxdev = 7;
            my $controller = int($drive->{index} / $maxdev);
-	   $pciaddr = print_pci_addr("scsi$controller");
-           push @$cmd, '-device', "lsi,id=scsi$controller$pciaddr" if !$scsicontroller->{$controller};
+           $pciaddr = print_pci_addr("lsi$controller");
+           push @$cmd, '-device', "lsi,id=lsi$controller$pciaddr" if !$scsicontroller->{$controller};
            $scsicontroller->{$controller}=1;
         }
 
@@ -2904,8 +2904,8 @@ sub print_pci_addr {
 	#addr2 : first videocard
 	balloon0 => { bus => 0, addr => 3 },
 	watchdog => { bus => 0, addr => 4 },
-	scsi0 => { bus => 0, addr => 5 },
-	scsi1 => { bus => 0, addr => 6 },
+	lsi0 => { bus => 0, addr => 5 },
+	lsi1 => { bus => 0, addr => 6 },
 	virtio0 => { bus => 0, addr => 10 },
 	virtio1 => { bus => 0, addr => 11 },
 	virtio2 => { bus => 0, addr => 12 },
-- 
1.7.2.5




More information about the pve-devel mailing list