5
0
mirror of git://git.proxmox.com/git/pve-storage.git synced 2025-01-07 17:18:02 +03:00

diskmanage: fix determining array length

$#* is the last index, not the length.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-06-14 13:40:40 +02:00 committed by Thomas Lamprecht
parent 0e30b3121d
commit f7a95153d6

View File

@ -915,7 +915,7 @@ sub wipe_blockdev {
push $to_wipe->@*, "/dev/${part}" if -b "/dev/${part}";
});
if (scalar($to_wipe->$#*) > 0) {
if (scalar($to_wipe->@*) > 0) {
print "found child partitions to wipe: ". join(', ', $to_wipe->@*) ."\n";
}
push $to_wipe->@*, $devpath; # put actual device last