Skip to content

stty: fix open and read calls

Ranulfo Raphael requested to merge ranulfo/rtems-tools:stty into main

Summary

This merge request fixes the open() and read() calls for tty devices on rtems tester and run.

Opening a device in 'rw' mode causes:

error: opening tty dev: /dev/ttyACM0: must have exactly one of create/read/write/append mode

Reading from device:

Exception in thread tty[/dev/ttyACM0]:
[...]
  File "/usr/lib/python3.10/codecs.py", line 321, in decode
    data = self.buffer + input
TypeError: can't concat NoneType to bytes
Edited by Ranulfo Raphael

Merge request reports