all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH qemu-server] fix #5980: importdisk: fix spurious warning
@ 2024-12-09 10:58 Fabian Grünbichler
  2024-12-09 18:48 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2024-12-09 10:58 UTC (permalink / raw)
  To: pve-devel

if not target disk is given, it makes no sense to check that it is valid.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 PVE/CLI/qm.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/CLI/qm.pm b/PVE/CLI/qm.pm
index 030bbb3a..4214a7ca 100755
--- a/PVE/CLI/qm.pm
+++ b/PVE/CLI/qm.pm
@@ -599,7 +599,7 @@ __PACKAGE__->register_method ({
 	my $target_disk = extract_param($param, 'target-disk');
 
 	# do_import does not allow invalid drive names (e.g. unused0)
-	$target_disk = undef if !is_valid_drivename($target_disk);
+	$target_disk = undef if $target_disk && !is_valid_drivename($target_disk);
 
 	my $vm_conf = PVE::QemuConfig->load_config($vmid);
 	PVE::QemuConfig->check_lock($vm_conf);
-- 
2.39.5



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH qemu-server] fix #5980: importdisk: fix spurious warning
  2024-12-09 10:58 [pve-devel] [PATCH qemu-server] fix #5980: importdisk: fix spurious warning Fabian Grünbichler
@ 2024-12-09 18:48 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2024-12-09 18:48 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

Am 09.12.24 um 11:58 schrieb Fabian Grünbichler:
> if not target disk is given, it makes no sense to check that it is valid.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
>  PVE/CLI/qm.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>

applied, thanks!


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-09 18:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09 10:58 [pve-devel] [PATCH qemu-server] fix #5980: importdisk: fix spurious warning Fabian Grünbichler
2024-12-09 18:48 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal