Please don't apply this one.

It would be necessary to add
    default_key => 1,
to $unuseddesc and below it would be necessary to use
    ? {file => $unuseddesc}
so that the result of parse_drive is a hash with a
'file' key set.

On 3/2/20 11:33 AM, Fabian Ebner wrote:
Signed-off-by: Fabian Ebner <f.eb...@proxmox.com>
---
  PVE/QemuServer/Drive.pm | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/PVE/QemuServer/Drive.pm b/PVE/QemuServer/Drive.pm
index 1af1d36..fed379e 100644
--- a/PVE/QemuServer/Drive.pm
+++ b/PVE/QemuServer/Drive.pm
@@ -418,7 +418,7 @@ sub parse_drive {
        return undef;
      }
- my $desc = $key =~ /^unused\d+$/ ? $alldrive_fmt
+    my $desc = $key =~ /^unused\d+$/ ? $unuseddesc
                                       : $drivedesc_hash->{$key}->{format};
      if (!$desc) {
        warn "invalid drive key: $key\n";


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

Reply via email to