mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-09 10:28:35 +00:00
CpuSet short_string - avoid ranges like 0-0, 1-1, 2-2, ...
This commit is contained in:
parent
1621113cec
commit
74116083bb
@ -164,7 +164,11 @@ sub short_string {
|
|||||||
$next = $cpu;
|
$next = $cpu;
|
||||||
} else {
|
} else {
|
||||||
$res .= ',' if length($res);
|
$res .= ',' if length($res);
|
||||||
$res .= "$last-$next";
|
if ($last != $next) {
|
||||||
|
$res .= "$last-$next";
|
||||||
|
} else {
|
||||||
|
$res .= "$last";
|
||||||
|
}
|
||||||
$last = $next = $cpu;
|
$last = $next = $cpu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user