On 2011-Jul-02 11:13:57 -0400, Ben Kaduk <minimar...@gmail.com> wrote: >On Sat, Jul 2, 2011 at 9:54 AM, Ed Schouten <e...@freebsd.org> wrote: >> Reintroduce the cioctl() hook in the TTY layer for digi(4).
Thanks Ed. >> The cioctl() hook can be used by drivers to add ioctls to the *.init and >> *.lock devices. This commit breaks the ttydevsw ABI, since this > >Aren't __FreeBSD_version bumps cheap, these days? A __FreeBSD_version bump can help a driver determine whether specific functionality is available in the kernel but that doesn't solve this particular issue. A struct ttydevsw is allocated and populated by a TTY device driver and passed to the generic TTY code to define callbacks from the generic code into the driver. Consider the case where a module compiled with an old struct ttydevsw definition is loaded into a new kernel - the generic TTY code will attempt to reference ttydevsw fields that aren't defined by the driver, with results that won't be pretty. -- Peter Jeremy
pgphpfvkXQK8n.pgp
Description: PGP signature