[pve-devel] applied: [PATCH v2 qemu-server 03/28] print_drive: Use $skip to avoid the need to copy the hash
Fabian Grünbichler
f.gruenbichler at proxmox.com
Tue Feb 25 12:31:04 CET 2020
nice find!
On February 24, 2020 1:43 pm, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
> PVE/QemuServer.pm | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 751a075..1580514 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -1655,9 +1655,8 @@ sub parse_drive {
>
> sub print_drive {
> my ($drive) = @_;
> - my $data = { %$drive };
> - delete $data->{$_} for qw(index interface);
> - return PVE::JSONSchema::print_property_string($data, $alldrive_fmt);
> + my $skip = [ 'index', 'interface' ];
> + return PVE::JSONSchema::print_property_string($drive, $alldrive_fmt, $skip);
> }
>
> sub scsi_inquiry {
> --
> 2.20.1
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
More information about the pve-devel
mailing list