diff options
author | Daniel Bertalan <dani@danielbertalan.dev> | 2021-10-25 14:36:05 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-25 21:42:26 +0200 |
commit | 5f6030b13cb24ad209b96f27f0f95152ceab439d (patch) | |
tree | 643998c2f46eadacd5a3b00628e6a4c966560c3e /Userland/Libraries/LibC/sys/ttydefaults.h | |
parent | 0e68550c051a6f1b629f9ca7f7ae968044f93b91 (diff) | |
download | serenity-5f6030b13cb24ad209b96f27f0f95152ceab439d.zip |
Kernel+LibC: Default to 8-bit characters in TTY
Some ports (like `bc` with history enabled) sensibly set the termios
character size to 8 bits.
Previously, we left the character size value (given by the bitmask
CSIZE) as zero by default (meaning 5 bits per character), and returned
ENOTIMPL whenever someone modified it. This was dumb.
Diffstat (limited to 'Userland/Libraries/LibC/sys/ttydefaults.h')
-rw-r--r-- | Userland/Libraries/LibC/sys/ttydefaults.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/sys/ttydefaults.h b/Userland/Libraries/LibC/sys/ttydefaults.h index de8eeee645..2db57a43b2 100644 --- a/Userland/Libraries/LibC/sys/ttydefaults.h +++ b/Userland/Libraries/LibC/sys/ttydefaults.h @@ -11,7 +11,7 @@ #define TTYDEF_LFLAG_NOECHO (ISIG | ICANON) #define TTYDEF_LFLAG_ECHO (TTYDEF_LFLAG_NOECHO | ECHO | ECHOE | ECHOK | ECHONL) #define TTYDEF_LFLAG TTYDEF_LFLAG_ECHO -#define TTYDEF_CFLAG (0) +#define TTYDEF_CFLAG (CS8) #define TTYDEF_SPEED (B9600) #define CTRL(c) (c & 0x1F) |