Reputation: 16341
Related to this question: tty-flip-buffer-push-sends-data-back-to-itself
So I had the same issue, where I have written a driver and in my tty callback code that writes back out of the tty to the user (who is running cat /dev/mytty
).
When I write to the tty it loops back and cat should print it out. However since echo it on it goes around in a loop forever. Entering the command stty -F /dev/mytty -echo
fixes that.
So my question is in my driver code is there a setting that I can change to not default to echo on? Maybe in the tty_probe(...)
or tty_set_operations(...)
functinos?
Upvotes: 3
Views: 1657
Reputation: 7487
You can turn off echo before the call to tty_set_operations()
with something like the following:
tty_driver->init_termios.c_lflag &= ~ECHO;
Upvotes: 3