[pve-devel] [PATCH qemu-server v2 04/15] api: remove unused size variable in check_storage_access

Fiona Ebner f.ebner at proxmox.com
Thu Feb 20 15:04:22 CET 2025


Am 11.02.25 um 17:08 schrieb Daniel Kral:
> Remove variable `$size`, which is not used here and likely a copy-paste
> redundancy from the `create_disks` subroutine.
> 
> Signed-off-by: Daniel Kral <d.kral at proxmox.com>

Reviewed-by: Fiona Ebner <f.ebner at proxmox.com>

> ---
> changes since v1:
> - new!
> 
>  PVE/API2/Qemu.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
> index 370036b8..5ac61aa5 100644
> --- a/PVE/API2/Qemu.pm
> +++ b/PVE/API2/Qemu.pm
> @@ -148,7 +148,7 @@ my $check_storage_access = sub {
>  	} elsif ($isCDROM && ($volid eq 'cdrom')) {
>  	    $rpcenv->check($authuser, "/", ['Sys.Console']);
>  	} elsif (!$isCDROM && ($volid =~ $PVE::QemuServer::Drive::NEW_DISK_RE)) {
> -	    my ($storeid, $size) = ($2 || $default_storage, $3);
> +	    my $storeid = $2 || $default_storage;
>  	    die "no storage ID specified (and no default storage)\n" if !$storeid;
>  	    $rpcenv->check($authuser, "/storage/$storeid", ['Datastore.AllocateSpace']);
>  	    my $scfg = PVE::Storage::storage_config($storecfg, $storeid);





More information about the pve-devel mailing list