Date: Wed, 25 Sep 1996 17:00:36 +0000 () From: David Nugent <davidn@sdev.blaze.net.au> To: Frode Nordahl <froden@bigblue.no> Cc: "questions@FreeBSD.org" <questions@FreeBSD.org> Subject: Re: Creating more /dev/ttyp's? Message-ID: <Pine.BSF.3.95.960925162558.5819R-100000@sdev.blaze.net.au> In-Reply-To: <199609241715.TAA09847@login.bigblue.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 24 Sep 1996, Frode Nordahl wrote: >I can't find any references to /dev/ttyp* in the MAKEDEV script, >so I wonder what parameters I should use to make them with >mknod. I'm not sure of what naming conventions apply, since my /dev/directory (which I did not originally create) doesn't seem to agree with /etc/ttys. /etc/ttys seems to suggest that the sequences starts at ttyp0 - ttypf (15 ptys), and then continues ttyq0 - ttyqf, and so on. /dev/ttyp0 here starts at ttyp0 and continues up to /dev/ttypv, for 32 ptys (which is how many I happen to have enabled). So, assuming that the prefix letter changes for each 32 ptys, then the following script should do what you want (after all, it isn't the names that are important, but the major,minor device numbers - but it'd be nice to know what the correct "FreeBSD convention" is). In the meantime, just make sure that this corresponds to /dev/ttys. #!/bin/sh count=0 sub=0 pfx=p sfx='0123456789abdcefghijklmnopqrstuv' while [ $count -lt 64 ] do if [ $count = 32 ]; then pfx=q sub=32 fi sxx=`echo $sfx | cut -c $(($count - $sub + 1))` dev=/dev/tty${pfx}${sxx} cmd="mknod $dev c 5 $count" if [ ! -c $dev ]; then echo $cmd `$cmd` else echo $cmd "(exists)" fi count=$(($count + 1)) done Hope this helps, David David Nugent, Unique Computing Pty Ltd - Melbourne, Australia Voice +61-3-791-9547 Data/BBS +61-3-792-3507 3:632/348@fidonet davidn@blaze.net.au http://www.blaze.net.au/~davidn
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95.960925162558.5819R-100000>