mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-02 03:56:42 +00:00
run: power off only the port which was switched on
This commit is contained in:
parent
27b6839ee0
commit
1b60fd6147
7
tool/run
7
tool/run
@ -655,14 +655,13 @@ rename exit power_plug_off_exit
|
|||||||
proc exit {{status 0}} {
|
proc exit {{status 0}} {
|
||||||
global run_target
|
global run_target
|
||||||
if {[regexp "reset" $run_target]} {
|
if {[regexp "reset" $run_target]} {
|
||||||
|
set power_port [get_cmd_arg --reset-port 1]
|
||||||
set connection_id [power_plug_connect]
|
set connection_id [power_plug_connect]
|
||||||
|
|
||||||
for { set i 0 } { $i < 4 } { incr i } {
|
puts "switch port $power_port off"
|
||||||
puts "switch port $i off"
|
send -i $connection_id "port $power_port 0\n"
|
||||||
send -i $connection_id "port $i 0\n"
|
|
||||||
expect -i $connection_id "250 OK"
|
expect -i $connection_id "250 OK"
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
power_plug_off_exit $status
|
power_plug_off_exit $status
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user