tcl/interface/raspberrypi5-gpiod: fix string match pattern escaping
Use correct TCL syntax and save string map operation. Change-Id: Ic2a522bd57cf6610b7df1d9cddd0fbdc2076ed62 Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: https://review.openocd.org/c/openocd/+/8426 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
efe9022197
commit
ac63cd00d7
|
@ -19,8 +19,7 @@ proc read_file { name } {
|
||||||
}
|
}
|
||||||
|
|
||||||
set pcie_aspm [read_file /sys/module/pcie_aspm/parameters/policy]
|
set pcie_aspm [read_file /sys/module/pcie_aspm/parameters/policy]
|
||||||
# escaping [ ] characters in string match pattern does not work in Jim-Tcl
|
if {![string match {*\[performance\]*} $pcie_aspm]} {
|
||||||
if {![string match "*<performance>*" [string map { "\[" < "\]" > } $pcie_aspm]]} {
|
|
||||||
echo "Warn : Switch PCIe power saving off or the first couple of pulses gets clocked as fast as 20 MHz"
|
echo "Warn : Switch PCIe power saving off or the first couple of pulses gets clocked as fast as 20 MHz"
|
||||||
echo "Warn : Issue 'echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy'"
|
echo "Warn : Issue 'echo performance | sudo tee /sys/module/pcie_aspm/parameters/policy'"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue