CpuSet short_string - avoid ranges like 0-0, 1-1, 2-2, ...

This commit is contained in:
Dietmar Maurer 2016-12-21 08:44:14 +01:00
parent 1621113cec
commit 74116083bb

View File

@ -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;
}
}