[pve-devel] [PATCH v3 qemu-server 6/7] Use correct description for unused drives

Fabian Ebner f.ebner at proxmox.com
Tue Mar 3 08:49:22 CET 2020


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.ebner at 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";
> 




More information about the pve-devel mailing list