Age | Commit message (Collapse) | Author |
|
|
|
|
|
Linux only requires acking release and ignores ack of acquire, but
FreeBSD is more stringent and will patiently wait for both to be acked.
Implement proper acking for both events.
|
|
FreeBSD adds one to the VT number returned by the GET_ACTIVE ioctl, so
to match things up, the wrapper here subtracted by one. This lead to
ttyv0 being named VT 0. This had the side-effect of VT numbering not
matching expectations, and switching not behaving as intended.
Align numbers with expectations, and move the required subtraction to
terminal_open, so that VT 1 matches ttyv0.
|
|
|
|
FreeBSD TTY paths are contructed in the kernel using the %r formatter,
which in this case ends up being a base 32 encoding.
The base 32 implementation is taken more or less directly from wlroots
commit fc6c0ca12e94.
|
|
This was causing all VT and TTY changes to be applied to the wrong TTY.
|
|
Taken from X11, weston and consolekit2 ports for FreeBSD.
Setting just K_CODE as done before makes input seemingly have no ill
effects, but it is still buffered and possibly send to the terminal
after application exit if stdin is never drained. Setting raw mode
appears to be needed to solve that issue.
A K_OFF-like VT keyboard setting like Linux has would seem more
appropriate, but that is not currently available to us on FreeBSD.
|
|
The VT and KD ioctl's are picky about the tty fd used. In order to
satisfy these, and to improve state cleanup, we now only and store the
current tty when opening a client, and use this fd to perform teardown
later. The presence of the fd is also used to signal that teardown is
needed.
|
|
|
|
|
|
|
|
|