Commit 2da4934a authored by Guillaume Tucker's avatar Guillaume Tucker

Only create symlinks for consoles that have a pty device

With the option to leave some consoles as their original /dev/ttyUSB*
device and not convert them to a /dev/pty/* device, they may not all
be always available.  Only create symlinks for consoles set up as pty.
Signed-off-by: Guillaume Tucker's avatarGuillaume Tucker <>
parent 231f2d35
......@@ -60,9 +60,13 @@ def handle_sigterm(sig, stack):
def do_connect(port, board_name):
servo_client = client.ServoClient(host="", port=port)
results = servo_client.set_get_all(["ec_uart_pty", "cpu_uart_pty"])
for pts, dev in zip(results, ["ec", "cpu"]):
for dev in ['ec', 'cpu']:
console_name = '{}_uart_pty'.format(dev)
pts = servo_client.get(console_name)
except client.ServoClientError:
print("{} UART: {}".format(dev.upper(), pts))
os.symlink(pts, os.path.join(DEV_DIR, "-".join([dev, "uart"])))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment