mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-06 13:17:56 +03:00
foreach volid helper: make $pending parameter behave like a boolean
Avoids potential future mistake with passing in an explicit 0. Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
This commit is contained in:
parent
ee2febbaa0
commit
219719aada
@ -4865,12 +4865,12 @@ sub foreach_volid {
|
||||
|
||||
$volhash->{$volid}->{is_attached} //= 0;
|
||||
$volhash->{$volid}->{is_attached} = 1
|
||||
if !$volhash->{$volid}->{is_unused} && !defined($snapname) && !defined($pending);
|
||||
if !$volhash->{$volid}->{is_unused} && !defined($snapname) && !$pending;
|
||||
|
||||
$volhash->{$volid}->{referenced_in_snapshot}->{$snapname} = 1
|
||||
if defined($snapname);
|
||||
|
||||
$volhash->{$volid}->{referenced_in_pending} = 1 if defined($pending);
|
||||
$volhash->{$volid}->{referenced_in_pending} = 1 if $pending;
|
||||
|
||||
my $size = $drive->{size};
|
||||
$volhash->{$volid}->{size} //= $size if $size;
|
||||
|
Loading…
Reference in New Issue
Block a user