mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-11-16 21:20:08 +00:00
The hard-coded 0x5402/0x5403/0x5404 are the x86 (generic) values. On powerpc TCSETS, TCSETSW and TCSETSF are 0x802c7414..6, so Tcsetattr failed with ENOTTY and every kitten that sets terminal modes exited at once: on ppc64le the paste confirmation (kitten ask) only flickered and the paste was dropped. x/sys/unix defines the right value per architecture, as already used for TCGETS in Tcgetattr and for TIOCSETA* in tty_bsd.go. Drop the rest of the constant block too: copied from pkg/term, unused, and also x86-only. Verified on ppc64le: kitten ask under script(1) failed with "inappropriate ioctl for device" (strace: ioctl 0x5402 = -ENOTTY); with this change the TCSETS ioctl succeeds and the prompt runs. |
||
|---|---|---|
| .. | ||
| tty.go | ||
| tty_bsd.go | ||
| tty_linux.go | ||