From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 3070E942BF for ; Wed, 10 Apr 2024 13:18:22 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 11FDADE87 for ; Wed, 10 Apr 2024 13:17:52 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 10 Apr 2024 13:17:51 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 53E4043C9A for ; Wed, 10 Apr 2024 13:17:51 +0200 (CEST) From: Hannes Duerr To: pve-devel@lists.proxmox.com Date: Wed, 10 Apr 2024 13:17:30 +0200 Message-Id: <20240410111730.189254-2-h.duerr@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240410111730.189254-1-h.duerr@proxmox.com> References: <20240410111730.189254-1-h.duerr@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.035 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: [pve-devel] [PATCH qemu-server v2 2/2] drive: improve readability to get_scsi_device_type X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Apr 2024 11:18:22 -0000 Signed-off-by: Hannes Duerr --- PVE/API2/Qemu.pm | 2 +- PVE/QemuServer.pm | 2 +- PVE/QemuServer/Drive.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index 497987f..dc44dee 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -751,7 +751,7 @@ sub assert_scsi_feature_compatibility { my $machine_type = PVE::QemuServer::get_vm_machine($conf, undef, $conf->{arch}); my $machine_version = PVE::QemuServer::Machine::extract_version( $machine_type, PVE::QemuServer::kvm_user_version()); - my $drivetype = PVE::QemuServer::Drive::get_scsi_devicetype( + my $drivetype = PVE::QemuServer::Drive::get_scsi_device_type( $drive, $storecfg, $machine_version); if ($drivetype ne 'hd' && $drivetype ne 'cd') { diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm index 6e2c805..bd375a2 100644 --- a/PVE/QemuServer.pm +++ b/PVE/QemuServer.pm @@ -1413,7 +1413,7 @@ sub print_drivedevice_full { my $unit = $drive->{index} % $maxdev; my $machine_version = extract_version($machine_type, kvm_user_version()); - my $devicetype = PVE::QemuServer::Drive::get_scsi_devicetype( + my $devicetype = PVE::QemuServer::Drive::get_scsi_device_type( $drive, $storecfg, $machine_version); if (!$conf->{scsihw} || $conf->{scsihw} =~ m/^lsi/ || $conf->{scsihw} eq 'pvscsi') { diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm index c829bde..6a4fafd 100644 --- a/PVE/QemuServer/Drive.pm +++ b/PVE/QemuServer/Drive.pm @@ -848,7 +848,7 @@ sub path_is_scsi { return $res; } -sub get_scsi_devicetype { +sub get_scsi_device_type { my ($drive, $storecfg, $machine_version) = @_; my $devicetype = 'hd'; -- 2.39.2