cpumap_functions.sh: fix perl experimental feature issue

An experimental feature added in Perl 5.14 allowed each, keys, push,
pop, shift, splice, unshift, and values to be called with a scalar
argument. This experiment is considered unsuccessful, and has been
removed in 5.23 and later releases. So don't use this feature to
avoid failure:
localhost:~# platform_expanded_cpu_list
Experimental keys on scalar is now forbidden at -e line 13.

Closes-Bug: 1901642
Change-Id: I5898145151e25538c745572da51af26b9251c285
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
This commit is contained in:
Jackie Huang 2020-10-27 10:17:31 -06:00 committed by Jackie_Huang
parent ddd40f08f2
commit e3f78a9c0a
1 changed files with 1 additions and 1 deletions

View File

@ -389,7 +389,7 @@ function topology_to_cpulist {
}
}
END {
@cores = sort { $a <=> $b } keys $T{$socket};
@cores = sort { $a <=> $b } keys %{ $T{$socket} };
@sel_cores = splice @cores, $core_start, $num_cores;
@lcpus = ();
for $C (@sel_cores) {