]> git.proxmox.com Git - qemu-server.git/commitdiff
indentation cleanup
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Thu, 25 Feb 2016 10:43:01 +0000 (11:43 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 27 Feb 2016 09:20:19 +0000 (10:20 +0100)
PVE/QemuServer.pm

index 946e7889bab0529313597c2717a7f31c1091e172..4ca5e4be17263477186b74a419dbfcb52d7f9edb 100644 (file)
@@ -1235,33 +1235,33 @@ sub print_drivedevice_full {
        my ($maxdev, $controller, $controller_prefix) = scsihw_infos($conf, $drive);
        my $unit = $drive->{index} % $maxdev;
        my $devicetype = 'hd';
-        my $path = '';
-        if (drive_is_cdrom($drive)) {
-              $devicetype = 'cd';
+       my $path = '';
+       if (drive_is_cdrom($drive)) {
+           $devicetype = 'cd';
        } else {
-              if ($drive->{file} =~ m|^/|) {
-                  $path = $drive->{file};
-                 if (my $info = path_is_scsi($path)) {
-                     if ($info->{type} == 0) {
-                         $devicetype = 'block';
-                     } elsif ($info->{type} == 1) { # tape
-                         $devicetype = 'generic';
-                     }
-                 }
-              } else {
-                  $path = PVE::Storage::path($storecfg, $drive->{file});
-              }
-
-             if($path =~ m/^iscsi\:\/\//){
-                 $devicetype = 'generic';
-             }
-         }
+           if ($drive->{file} =~ m|^/|) {
+               $path = $drive->{file};
+               if (my $info = path_is_scsi($path)) {
+                   if ($info->{type} == 0) {
+                       $devicetype = 'block';
+                   } elsif ($info->{type} == 1) { # tape
+                       $devicetype = 'generic';
+                   }
+               }
+           } else {
+                $path = PVE::Storage::path($storecfg, $drive->{file});
+           }
 
-        if (!$conf->{scsihw} || ($conf->{scsihw} =~ m/^lsi/)){
-            $device = "scsi-$devicetype,bus=$controller_prefix$controller.0,scsi-id=$unit,drive=drive-$drive->{interface}$drive->{index},id=$drive->{interface}$drive->{index}";
-        } else {
-            $device = "scsi-$devicetype,bus=$controller_prefix$controller.0,channel=0,scsi-id=0,lun=$drive->{index},drive=drive-$drive->{interface}$drive->{index},id=$drive->{interface}$drive->{index}";
-        }
+           if($path =~ m/^iscsi\:\/\//){
+               $devicetype = 'generic';
+           }
+       }
+
+       if (!$conf->{scsihw} || ($conf->{scsihw} =~ m/^lsi/)){
+           $device = "scsi-$devicetype,bus=$controller_prefix$controller.0,scsi-id=$unit,drive=drive-$drive->{interface}$drive->{index},id=$drive->{interface}$drive->{index}";
+       } else {
+           $device = "scsi-$devicetype,bus=$controller_prefix$controller.0,channel=0,scsi-id=0,lun=$drive->{index},drive=drive-$drive->{interface}$drive->{index},id=$drive->{interface}$drive->{index}";
+       }
 
     } elsif ($drive->{interface} eq 'ide'){
        $maxdev = 2;