X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FCpuSet.pm;h=483405e194f2f35963a6480c7c049648d508ac85;hp=7293d9bcfe4cacfab58f0457907402c1c5433613;hb=74116083bb65f00217816db0b092b1f6d33d64e3;hpb=9c07db40e070caeefa4a67d5b9efacceada885db diff --git a/src/PVE/CpuSet.pm b/src/PVE/CpuSet.pm index 7293d9b..483405e 100644 --- a/src/PVE/CpuSet.pm +++ b/src/PVE/CpuSet.pm @@ -164,7 +164,11 @@ sub short_string { $next = $cpu; } else { $res .= ',' if length($res); - $res .= "$last-$next"; + if ($last != $next) { + $res .= "$last-$next"; + } else { + $res .= "$last"; + } $last = $next = $cpu; } }