Re: Serial Port Configuration does not work

看板FB_current作者時間14年前 (2011/09/11 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/12 (看更多)
On Sat, 10 Sep 2011 15:57:25 +0400 Boris Samorodov <bsam@ipt.ru> 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 bsam@bb.ipt.ru:/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 _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1EQwNXpf (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1EQwNXpf (FB_current)