config_tools: update the regex range of online cpu

update the regex range of online cpu from [1-99] to [0-9]
in script to make power on/off RTVM normally.

Tracked-On: #6482
Signed-off-by: Kunhui-Li <kunhuix.li@intel.com>
This commit is contained in:
Kunhui-Li 2021-08-25 11:06:11 +08:00 committed by wenlingz
parent 51a747d9c8
commit 44942b4cb7

View File

@ -95,7 +95,7 @@ def off_line_cpus(args, vmid, uos_type, config):
print(" for j in {}; do".format(' '.join([str(i) for i in pcpu_id_list])), file=config)
print(' if [ "cpu"$j = $i ]; then', file=config)
print(' online=`cat ${cpu_path}/$i/online`', file=config)
print(' idx=`echo $i | tr -cd "[1-99]"`', file=config)
print(' idx=`echo $i | tr -cd "[0-9]"`', file=config)
print(' echo $i online=$online', file=config)
print(' if [ "$online" = "1" ]; then', file=config)
print(" echo 0 > ${cpu_path}/$i/online", file=config)