Home
last modified time | relevance | path

Searched hist:"20 d152b8d86d84259f382aef3a0d10d489bf17cb" (Results 1 – 1 of 1) sorted by relevance

/optee_os/scripts/
H A Dsymbolize.py20d152b8d86d84259f382aef3a0d10d489bf17cb Wed Sep 25 18:28:33 UTC 2019 Jerome Forissier <jerome@forissier.org> symbolize.py: fix exception when stdin is not a terminal

Commit 6b4fc6752b3c ("symbolize.py: disable terminal local echo") uses
termios functions on stdin unconditionally. Unfortunately, this will
cause an exception when stdin is not a terminal, for instance:

$ echo Hello | ./script/symbolize.py
Traceback (most recent call last):
File "./scripts/symbolize.py", line 497, in <module>
main()
File "./scripts/symbolize.py", line 484, in main
old = termios.tcgetattr(fd)
termios.error: (25, 'Inappropriate ioctl for device')

Fix the issue by making sure stdin is a TTY before using the termios
functions.

Fixes: 6b4fc6752b3c ("symbolize.py: disable terminal local echo")
Signed-off-by: Jerome Forissier <jerome@forissier.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>