Discussion:
slattach(8), attache line discipline by name
Marc Balmer
2013-10-19 19:08:47 UTC
Permalink
slattach(8) claims to attach tty line disciplines by name using the -t
option. It does, however, only attach the slip or strip discpline (if
the latter is enabled). It uses an ioctl to attach the line discipline
by number. It is not possible to pass an arbitrary line discipline name.

NetBSD registers tty line disciplines internally by name (line
disciplines register themselved by calling ttyldisc_attach()), but
slattach(8) in its current form is not able to attach such named line
disciplines.

The attached patch to slattach(8) changes it to use the TIOCSLINED
ioctl, which passes a line discipline by name, instead of by number,
making slattach usable for any line discipline. The default line
discipline remains at "slip".

ok?
Christos Zoulas
2013-10-19 20:19:04 UTC
Permalink
-=-=-=-=-=-
slattach(8) claims to attach tty line disciplines by name using the -t
option. It does, however, only attach the slip or strip discpline (if
the latter is enabled). It uses an ioctl to attach the line discipline
by number. It is not possible to pass an arbitrary line discipline name.
NetBSD registers tty line disciplines internally by name (line
disciplines register themselved by calling ttyldisc_attach()), but
slattach(8) in its current form is not able to attach such named line
disciplines.
The attached patch to slattach(8) changes it to use the TIOCSLINED
ioctl, which passes a line discipline by name, instead of by number,
making slattach usable for any line discipline. The default line
discipline remains at "slip".
ok?
LGTM.

christos

Loading...