On Sat, 10 Sep 2011 15:57:25 +0400 Boris Samorodov <[email protected]> wrote:
> On Tue, 06 Sep 2011 16:29:51 +0400 Boris Samorodov wrote: > > > the port does not work as expected (at least as per The Handbook, > > 26.2.5 Serial Port Configuration). Nether "init" nor "lock" > > devices can be used: > > ----- > > # uname -a > > FreeBSD host1.ipt.ru 9.0-BETA2 FreeBSD 9.0-BETA2 #14 r225395: Mon Sep > > 5 18:10:43 MSK 2011 [email protected]:/usr/obj/usr/src/sys/HOSTS i386 > > # ls -l /dev/ttyu5* > > crw------- 1 root wheel 0, 56 Sep 5 18:50 /dev/ttyu5 > > crw------- 1 root wheel 0, 57 Sep 5 18:50 /dev/ttyu5.init > > crw------- 1 root wheel 0, 58 Sep 5 18:50 /dev/ttyu5.lock > > # stty -f /dev/ttyu5.init 57600 > > stty: /dev/ttyu5.lock isn't a terminal > > # stty -f /dev/ttyu5.lock cs7 > > stty: /dev/ttyu5.lock isn't a terminal > > ----- > > Ping! > Seems that the handbook is out of date. Looking at /sys/kern/tty.c the init and lock devices are only used internally and are not "real" open-able/close-able devices. Thye're created in tty_makedev() as required using make_dev_cred(), which is probably why they appear under /dev. The init device is initialized in tty_init_termios() and _never_ changed after that. It's only used to initialize "real" ttys. The lock device seems to only be used in tty_ioctl(). I wasn't able to figure out where it gets initialized. -- Gary Jennejohn _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "[email protected]"
